DSN1COMP output

The DSN1COMP utility generates a report that includes the estimated space savings that can be achieved by using compression.

Start of change

The first part of the report lists the input parameters in message DSN1944I. For table spaces, this message also reports whether the input data set was compressed and if so, the type of compression used. For example:

INPUT DATA SET CONTAINS COMPRESSED DATA 
USING HUFFMAN COMPRESSION TYPE  
If a compression dictionary exists, this message also reports whether the existing dictionary was built by an insert operation or by a utility. For example:
INPUT DICTIONARY WAS BUILT BY INSERT

Message DSN1940I then lists the requested compression estimates. For table spaces, this message also reports whether the hardware required for Huffman compression (IBM z14® or later) is available.

For table space reports, the following fields contain the indicated values:

DATA PAGES NEEDED
The number of pages that are needed for data. For the columns that report compression information, this value is calculated based on the percent of savings from the estimated total uncompressed data.
DICTIONARY PAGES REQUIRED
The estimated number of pages required to build dictionary pages. For segmented (non-UTS) table spaces or universal table spaces (UTS), these pages are calculated based on the segment boundary. The entire segment is allocated for the dictionary pages and the SEGSIZE value contributes to the number of pages that are reserved for the dictionary pages. DICTIONARY PAGES REQUIRED does not reflect the actual number of pages used for the dictionary.
TOTAL PAGES
The total number of pages. For the columns that report compression information, this value is calculated based on the percent of savings from the estimated total uncompressed data.
End of change

Start of changeMessage DSN1994I reports the number of physical pages that are processed from the input file.End of change

Tip: If you receive message DSN1941I, use a data set with more rows as input, or specify a larger value for ROWLIMIT.
Start of change

Sample DSN1COMP reports for a table space

The following four sample reports show the DSN1COMP output for a table space based on the type of compression estimate (COMPTYPE) requested where the input data set is uncompressed.

COMPTYPE not specified: The following sample report shows the output when COMPTYPE is not specified. In this case, DSN1COMP was run on IBM z14 or later hardware. (If DSN1COMP is run on earlier hardware, the report omits the Huffman compression estimate.)

DSN1999I START OF DSN1COMP FOR JOB DSN1CMP  COMPTS4
DSN1998I INPUT DSNAME = DSNC000.DSNDBC.EMPDB.EMPSPACE.I0001.A001    , VSAM
DSN1944I DSN1COMP INPUT PARAMETERS
                  INPUT DATA SET CONTAINS NON-COMPRESSED DATA 
           4,096  DICTIONARY SIZE USED
               0  FREEPAGE VALUE USED
               5  PCTFREE VALUE USED
                  COMPTYPE NOT SPECIFIED
                  NO ROWLIMIT WAS REQUESTED
                  ESTIMATE BASED ON DB2 LOAD METHOD
             255  MAXROWS VALUE USED

DSN1940I DSN1COMP COMPRESSION REPORT
  HARDWARE SUPPORT FOR HUFFMAN COMPRESSION IS AVAILABLE 
  +-----------------------------------+------------------+------------------+------------------+
  |                                   |                  | Estimated state  | Estimated state  |
  |                                   | UNCOMPRESSED     | Compressed       | Compressed       |
  |                                   |                  | FIXED            | HUFFMAN          |
  +-----------------------------------+------------------+------------------+------------------+  
  | DATA (IN KB)                      |              224 |              178 |              173 |
  | PERCENT SAVINGS                   |                  |               20%|               22%|
  |                                   |                  |                  |                  |
  | AVERAGE BYTES PER ROW             |               48 |               39 |               38 |
  | PERCENT SAVINGS                   |                  |               18%|               20%|
  |                                   |                  |                  |                  |
  | DATA PAGES NEEDED                 |               63 |               68 |               70 |
  | PERCENT DATA PAGES SAVED          |                  |                7%|               11%|
  |                                   |                  |                  |                  |
  | DICTIONARY PAGES REQUIRED         |                0 |               16 |               20 |
  | ROWS SCANNED TO BUILD DICTIONARY  |                  |            1,969 |            1,969 |
  | ROWS SCANNED TO PROVIDE ESTIMATE  |                  |            5,000 |            5,000 |
  | DICTIONARY ENTRIES                |                  |            4,096 |            4,080 |
  |                                   |                  |                  |                  |
  | TOTAL PAGES (DICTIONARY + DATA)   |               63 |               84 |               90 |
  | PERCENT SAVINGS                   |                  |               33%|               42%|
  +-----------------------------------+------------------+------------------+------------------+

DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,             63  PAGES PROCESSED

COMPTYPE(ALL) The following sample report shows the output for a table space when COMPTYPE(ALL) is specified. It includes the estimated space savings for both fixed-length and Huffman compression.

DSN1999I START OF DSN1COMP FOR JOB DSN1CMP  STEP2
DSN1998I INPUT DSNAME = DSNC000.DSNDBC.DB1.TS1.I0001.A001           , VSAM
DSN1944I DSN1COMP INPUT PARAMETERS
         INPUT DATA SET CONTAINS NON-COMPRESSED DATA
           4,096  DICTIONARY SIZE USED
               0  FREEPAGE VALUE USED
               5  PCTFREE VALUE USED
                  NO ROWLIMIT WAS REQUESTED
                  ESTIMATE BASED ON DB2 LOAD METHOD
             255  MAXROWS VALUE USED
             255  MAXROWS VALUE USED

DSN1940I DSN1COMP COMPRESSION REPORT
Hardware support for Huffman compression is available
  +-----------------------------------+------------------+------------------+------------------+
  |                                   |                  | Estimated state  | Estimated state  |
  |                                   | UNCOMPRESSED     | Compressed       | Compressed       |
  |                                   |                  | FIXED            | HUFFMAN          |
  +-----------------------------------+------------------+------------------+------------------+ 
  | Data (in KB)                      |            1,758 |            1,232 |            1,278 |
  | Percent savings                   |                  |               29%|               27%|
  |                                   |                  |                  |                  |
  | Average Bytes per row             |               38 |               28 |               29 |
  | Percent savings                   |                  |               26%|               23%|
  |                                   |                  |                  |                  |
  | Data Pages needed                 |              496 |              381 |              398 |
  | Percent Data pages saved          |                  |               23%|               19%|
  |                                   |                  |                  |                  |
  | Dictionary pages required         |                0 |               16 |               19 |
  | Rows scanned to build dictionary  |                  |            5,311 |            5,311 |
  | Rows scanned to provide estimate  |                  |           50,000 |           50,000 |
  | Dictionary Entries                |                  |            4,096 |            4,080 |
  |                                   |                  |                  |                  |
  | Total Pages (Dictionary + Data)   |              496 |              397 |              417 |
  | Percent savings                   |                  |               19%|               15%|
  +-----------------------------------+------------------+------------------+------------------+

DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,            475  PAGES PROCESSED

COMPTYPE(FIXED) The following sample report shows the output for a table space when COMPTYPE(FIXED) is specified. It includes the estimated space savings for only fixed-length compression.

DSN1999I START OF DSN1COMP FOR JOB DSN1CMP  STEP2
DSN1998I INPUT DSNAME = DSNC000.DSNDBC.DB1.TS1.I0001.A001           , VSAM
DSN1944I DSN1COMP INPUT PARAMETERS
         INPUT DATA SET CONTAINS NON-COMPRESSED DATA
           4,096  DICTIONARY SIZE USED
               0  FREEPAGE VALUE USED
               5  PCTFREE VALUE USED
                  NO ROWLIMIT WAS REQUESTED
                  ESTIMATE BASED ON DB2 LOAD METHOD
             255  MAXROWS VALUE USED
             255  MAXROWS VALUE USED

DSN1940I DSN1COMP COMPRESSION REPORT
Hardware support for Huffman compression is available
  +-----------------------------------+------------------+------------------+ 
  |                                   |                  | Estimated state  | 
  |                                   | UNCOMPRESSED     | Compressed       |
  |                                   |                  | FIXED            |   
  +-----------------------------------+------------------+------------------+   
  | Data (in KB)                      |            1,758 |            1,232 |
  | Percent savings                   |                  |               29%|
  |                                   |                  |                  |
  | Average Bytes per row             |               38 |               28 |
  | Percent savings                   |                  |               26%|
  |                                   |                  |                  |
  | Data Pages needed                 |              496 |              381 |
  | Percent Data pages saved          |                  |               23%|
  |                                   |                  |                  |
  | Dictionary pages required         |                0 |               16 |
  | Rows scanned to build dictionary  |                  |            5,311 |
  | Rows scanned to provide estimate  |                  |           50,000 |
  | Dictionary Entries                |                  |            4,096 |
  |                                   |                  |                  |
  | Total Pages (Dictionary + Data)   |              496 |              397 |
  | Percent savings                   |                  |               19%|
  +-----------------------------------+------------------+------------------+

DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,            475  PAGES PROCESSED

COMPTYPE(HUFFMAN) The following sample report shows the output for a table space when COMPTYPE(HUFFMAN) is specified. It includes the estimated space savings for only Huffman compression.

DSN1999I START OF DSN1COMP FOR JOB DSN1CMP  STEP2
DSN1998I INPUT DSNAME = DSNC000.DSNDBC.DB1.TS1.I0001.A001           , VSAM
DSN1944I DSN1COMP INPUT PARAMETERS
         INPUT DATA SET CONTAINS NON-COMPRESSED DATA
           4,096  DICTIONARY SIZE USED
               0  FREEPAGE VALUE USED
               5  PCTFREE VALUE USED
                  NO ROWLIMIT WAS REQUESTED
                  ESTIMATE BASED ON DB2 LOAD METHOD
             255  MAXROWS VALUE USED
             255  MAXROWS VALUE USED

DSN1940I DSN1COMP COMPRESSION REPORT
Hardware support for Huffman compression is available
  +-----------------------------------+------------------+------------------+
  |                                   |                  | Estimated state  |
  |                                   | UNCOMPRESSED     | Compressed       |
  |                                   |                  | HUFFMAN          | 
  +-----------------------------------+------------------+------------------+  
  | Data (in KB)                      |            1,758 |            1,278 |
  | Percent savings                   |                  |               27%|
  |                                   |                  |                  |
  | Average Bytes per row             |               38 |               29 |
  | Percent savings                   |                  |               23%|
  |                                   |                  |                  |
  | Data Pages needed                 |              496 |              398 |
  | Percent Data pages saved          |                  |               19%|
  |                                   |                  |                  |
  | Dictionary pages required         |                0 |               19 |
  | Rows scanned to build dictionary  |                  |            5,311 |
  | Rows scanned to provide estimate  |                  |           50,000 |
  | Dictionary Entries                |                  |            4,080 |
  |                                   |                  |                  |
  | Total Pages (Dictionary + Data)   |              496 |              417 |
  | Percent savings                   |                  |               15%|
  +-----------------------------------+------------------+------------------+

DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,            475  PAGES PROCESSED

Compressed input: The following sample report shows the output for a table space when the input data set is compressed. The output includes an extra column with information from the input compression dictionary.

DSN1999I START OF DSN1COMP FOR JOB DSN1CMP  STEP2
DSN1998I INPUT DSNAME = DB2DUMP.DSNDBD.DBPBR2.TSPBR2.I0001.A001     , SEQ
DSN1944I DSN1COMP INPUT PARAMETERS        
         INPUT DATA SET CONTAINS COMPRESSED DATA        
         USING FIXED-LENGTH COMPRESSION TYPE    
         INPUT DICTIONARY WAS BUILT BY INSERT  
           4,096  DICTIONARYSIZE USED   
               0  FREEPAGE VALUE USED    
               5  PCTFREE VALUE USED  
                  COMPTYPE NOT SPECIFIED  
                  NO ROWLIMIT WAS REQUESTED    
                  ESTIMATE BASED ON DB2 LOAD METHOD    
             255  MAXROWS VALUE USED                          
DSN1940I DSN1COMP COMPRESSION REPORT                                             
  HARDWARE SUPPORT FOR HUFFMAN COMPRESSION IS AVAILABLE     
+-----------------------------------+------------------+------------------+------------------+------------------+ 
|                                   |                  | Estimated state  | Estimated state  | Calculated       | 
|                                   | UNCOMPRESSED     | Compressed       | Compressed       | Compressed from  | 
|                                   |                  | FIXED            | HUFFMAN          | INPUT DICTIONARY | 
+-----------------------------------+------------------+------------------+------------------+------------------+
| DATA (IN KB)                      |        1,659,179 |          434,603 |          222,697 |          436,780 | 
| PERCENT SAVINGS                   |                  |               73%|               86%|               73%| 
|                                   |                  |                  |                  |                  |
| AVERAGE BYTES PER ROW             |            1,701 |              448 |              231 |              450 |
| PERCENT SAVINGS                   |                  |               73%|               86%|               73%| 
|                                   |                  |                  |                  |                  | 
| DATA PAGES NEEDED                 |          500,000 |          125,000 |           62,500 |          125,000 | 
| PERCENT DATA PAGES SAVED          |                  |               75%|               87%|               75%| 
|                                   |                  |                  |                  |                  | 
| DICTIONARY PAGES REQUIRED         |                0 |               64 |               64 |               64 | 
| ROWS SCANNED TO BUILD DICTIONARY  |                  |               81 |               81 |              N/A |
| ROWS SCANNED TO PROVIDE ESTIMATE  |                  |        1,000,000 |        1,000,000 |              N/A | 
| DICTIONARY ENTRIES                |                  |            4,096 |            4,080 |            4,096 | 
|                                   |                  |                  |                  |                  | 
| TOTAL PAGES (DICTIONARY + DATA)   |          500,000 |          125,064 |           62,564 |          125,064 | 
| PERCENT SAVINGS                   |                  |               74%|               87%|               74%|
+-----------------------------------+------------------+------------------+------------------+------------------+ 
DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,        118,475  PAGES PROCESSED  
End of change

Sample DSN1COMP report for an index

When you run DSN1COMP on an index, the generated report includes the estimated reduction in leaf page space, as shown in the following sample report:

DSN1999I START OF DSN1COMP FOR JOB DSN1COMP STEP2
DSN1998I INPUT DSNAME = TESTCAT.DSNDBD.DB1COMPR.I1.I0001.A001       , VSAM

DSN1944I DSN1COMP INPUT PARAMETERS
                  PROCESSING PARMS FOR INDEX DATASET:
                  NO LEAFLIM WAS REQUESTED

DSN1940I DSN1COMP COMPRESSION REPORT

              38  Index Leaf Pages Processed
           3,000  Keys Processed
           3,000  Rids Processed
             401  KB of Key Data Processed
             106  KB of Compressed Keys Produced


                  EVALUATION OF COMPRESSION WITH DIFFERENT INDEX PAGE SIZES:

                  ----------------------------------------------
               8  K Page Buffer Size yields a
              51  % Reduction in Index Leaf Page Space
                  The Resulting Index would have approximately
              49  % of the original index's Leaf Page Space
                  No Bufferpool Space would be unused
                  ----------------------------------------------

                  ----------------------------------------------
              16  K Page Buffer Size yields a
              74  % Reduction in Index Leaf Page Space
                  The Resulting Index would have approximately
              26  % of the original index's Leaf Page Space
               3  % of Bufferpool Space would be unused to
                  ensure keys fit into compressed buffers
                  ----------------------------------------------


DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,             38  PAGES PROCESSED
Start of change

Sample DSN1COMP report for an uncompressed LOB table space

When you run DSN1COMP on an uncompressed LOB table space, the generated report includes the estimated data pages saved for each page size, as shown in the following sample report:

DSN1944I DSN1COMP INPUT PARAMETERS
                  PROCESSING PARMS FOR LOB DATASET:

                  LOB

DSN1940I DSN1COMP COMPRESSION REPORT
 DSN1COMP run on uncompressed LOB table space


 LOB table space statistics
 ---------------------------------------------------------
 Number of LOBs                                                                15 LOBs
 Minimum LOB size                                                               5 KB
 Maximum LOB size                                                             148 KB
 Average LOB size                                                              59 KB


 LOB compression ratio
 ---------------------------------------------------------
 Total LOB data compressed                                                    656 KB
 Total LOB data uncompressed                                                  887 KB
 Percentage of KB saved                                                        27 %

 Minimum System pages required                                                 36 Pages
 Data pages needed for compressed LOB table space                             149 Pages
 Data pages needed for uncompressed LOB table space                           210 Pages
 Percentage of Data pages saved                                                30 %

 Current page size                                                              4 KB

 EVALUATION OF COMPRESSION WITH DIFFERENT PAGE SIZES
 Note: System Pages may contain LOB data!
 ---------------------------------------------------------
 4K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                           149 Pages
   Additional Data pages needed for uncompressed LOBs                         210 Pages
   Data pages saved (not including system pages)                               30 %

 8K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                            81 Pages
   Additional Data pages needed for uncompressed LOBs                         102 Pages
   Data pages saved (not including system pages)                               21 %

 16K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                            41 Pages
   Additional Data pages needed for uncompressed LOBs                          49 Pages
   Data pages saved (not including system pages)                               17 %

 32K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                            20 Pages
   Additional Data pages needed for uncompressed LOBs                          20 Pages
   Data pages saved (not including system pages)                                0 %

DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,          2,520  PAGES PROCESSED              

End of change
Start of change

Sample DSN1COMP report for a compressed LOB table space

When you run DSN1COMP on a compressed LOB table space, the generated report includes the estimated data pages saved for each page size, as shown in the following sample report:

DSN1944I DSN1COMP INPUT PARAMETERS
                  PROCESSING PARMS FOR LOB DATASET:

                  LOB

DSN1940I DSN1COMP COMPRESSION REPORT
 DSN1COMP run on compressed LOB table space


 LOB table space statistics
 ---------------------------------------------------------
 Number of LOBs                                                                15 LOBs
 Minimum LOB size                                                               5 KB
 Maximum LOB size                                                             148 KB
 Average LOB size                                                              28 KB


 Table space with compression (in KB)
 ---------------------------------------------------------
 Total uncompressed data                                                        0 KB
 Total compressed data                                                        241 KB
 Total LOB data                                                               241 KB

 Table space if uncompressed (in KB)
 ---------------------------------------------------------
 Total uncompressed data                                                      428 KB
 Total compressed data                                                          0 KB
 Total LOB data                                                               428 KB


 LOB compression ratio
 ---------------------------------------------------------
 Total LOB data compressed                                                    241 KB
 Total LOB data uncompressed                                                  428 KB
 Percentage of KB saved                                                        44 %

 Minimum System pages required                                                 36 Pages
 Data pages needed for compressed LOB table space                              47 Pages
 Data pages needed for uncompressed LOB table space                            95 Pages
 Percentage of Data pages saved                                                51 %

 Current page size                                                              4 KB


 EVALUATION OF COMPRESSION WITH DIFFERENT PAGE SIZES
 Note: System Pages may contain LOB data!
 ---------------------------------------------------------
 4K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                            47 Pages
   Additional Data pages needed for uncompressed LOBs                          95 Pages
   Data pages saved (not including system pages)                               51 %

 8K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                            23 Pages
   Additional Data pages needed for uncompressed LOBs                          45 Pages
   Data pages saved (not including system pages)                               49 %

 16K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                             7 Pages
   Additional Data pages needed for uncompressed LOBs                          18 Pages
   Data pages saved (not including system pages)                               62 %

 32K page size:
   Minimum System pages required                                               36 Pages
   Additional Data pages needed for compressed LOBs                             3 Pages
   Additional Data pages needed for uncompressed LOBs                           4 Pages
   Data pages saved (not including system pages)                               25 %

DSN1994I DSN1COMP COMPLETED SUCCESSFULLY,          2,520  PAGES PROCESSED      
End of change