Disk compression and capacity

Capacity gains might vary and are determined by the amount of compression that can be performed on the data.

An overall 2:1 compression ratio should be expected for a disk unit. A maximum 4:1 compression ratio for a disk unit might be achievable in certain circumstances. Additionally, a compression ratio for a set of data on that disk unit might reach a maximum of 8:1. The IBM i software enforces the overall disk unit maximum compression ratio of 4:1. Because capacity is dependent on how well the data compresses, the capacity that is displayed will change as data is written to or deleted from the disk. The capacity that is displayed for a compressed disk unit is the amount of data on the disk plus an estimate of how much additional data can fit on the disk.

The following example shows the calculation and display of capacity by the system for compressed disk units. The disk unit capacities are available on the Display Disk Configuration Capacity display under the DST menus and the SST menus. The capacities are also available on the Work with Disk Status (WRKDSKSTS) display.

Note: If you have the licensed program Performance Tools for IBM Performance Tools for i (5770-PT1) installed on the system, you might use the system report to display the compression ratio. (You can find the ratio in the Disk Compression Statistics section in the system report.)
  1. Before starting compression, a nonconfigured 6602 model 050 has a capacity of 1031 megabytes.
                              Display Non-Configured Units
     
    Serial                     Resource
    Number       Type    Model    Name      Capacity    Status
    83-0135199   6602      050    DD005         1031    Non-configured
    83-0306044   6602      050    DD006         1031    Non-configured 
  2. After starting compression, the 6602 model number changes to 060, and the capacity doubles.
                              Display Non-Configured Units
     
    Serial                     Resource
    Number       Type    Model    Name      Capacity    Status
    83-0135199   6602      060    DD005         2062    Non-configured
    83-0306044   6602      060    DD006         2062    Non-configured 
  3. Two compressed disk units are added into user ASP 2.
                         Display Disk Configuration Capacity
     
                                                ----Protected----   ---Unprotected---
    ASP  Unit  Type  Model  Threshold  Overflow     Size   % Used        Size   %Used
     1                          90%    No              0    0.00%       21372  17.26%
           1   6607    050                             0    0.00%        4194  29.25%
           2   6713    050                             0    0.00%        8589  14.33%
           3   6713    050                             0    0.00%        8589  14.34%
     
     2                          90%    No              0    0.00%        4124   0.10%
           5   6602    060                             0    0.00%        2062   0.10%
           6   6602    060                             0    0.00%        2062   0.10%
     
  4. After writing data to the user ASP, capacities and percentages that are used are displayed.
                         Display Disk Configuration Capacity
     
                                                ----Protected----   ---Unprotected---
    ASP  Unit  Type  Model  Threshold  Overflow     Size   % Used        Size   %Used
     1                          90%    No              0    0.00%       21372  17.26%
           1   6607    050                             0    0.00%        4194  29.25%
           2   6713    050                             0    0.00%        8589  14.33%
           3   6713    050                             0    0.00%        8589  14.34%
     
     2                          90%    No              0    0.00%        5812  61.06%
           5   6602    060                             0    0.00%        2905  61.04%
           6   6602    060                             0    0.00%        2907  61.08%
     
  5. The following calculations can be performed to determine how well the data is being compressed, and the estimated disk unit capacity. These calculations can be performed on a user ASP basis, as well as on individual disk units.
    Amount Calculation
    Logical data written Size * (% Used / 100)
    Physical free space (Size * (1-(% Used / 100)) / 2
    Physical space used Non-compressed size - Physical free space
    Compression ratio of data written Logical data written / Physical space used
    Estimated disk capacity Logical data written + (2 * Physical free space)

Using the values listed for Unit 5 in the preceding step with these formulas produces the following table:

Amount Calculation
Logical data written 2905 * .6104 = 1773
Physical free space (2905 * (1-(.6104)) / 2 = 566
Physical space used 1031 - 566 = 465
Compression ratio 1773 / 465 = 3.8
Estimated disk capacity 1773 + (2 * 566) = 2905