COMPAKTOR Reorganization


COMPAKTOR uses a number of algorithms in order to determine the optimal method of reorganizing a DASD volume. CPK attempts to produce a reorganized volume with as few free space areas and as few multi-extent data sets as possible. These algorithms are not used for TYPE=RELEASE since no data sets are moved.

Free space areas

A “free space area” is an unused area of a volume, unallocated cylinders or tracks. All COMPAKTOR algorithms attempt to minimize the number of free space areas in a reorganized volume (see Effect of the SIZEKEEP Option).

Multi-Extent data sets

COMPAKTOR attempts to reduce most multi-extent data sets to a single extent (see Effect of the SIZEKEEP Option). When this is not possible, it leaves data sets into two or more extents. However, no data set is ever split into more extents than it originally possessed; that is, no data set becomes “worse” than before COMPAKTion. In extreme cases, CPK may change the size of the extents. EXTENTS=KEEP and/or VSAMEXT=KEEP can override this.

COMPAKTOR algorithms

Before any algorithm is used, COMPAKTOR always does the following:

  • Placement of unmovable data sets
  • Placement of VTOC, if unmovable or absolute positioned
  • Placement of absolute positioned data sets and sequenced sets
  • Placement of relative positioned VTOCs and sequenced sets
  • Placement of relative positioned data sets

COMPAKTOR then goes through various algorithms to determine the placement of the remaining data sets, finally choosing the algorithm that results in the fewest free space areas.

Effect of the SIZEKEEP option

The SIZEKEEP performance option may affect the results of the COMPAKTOR algorithms just described. The SIZEKEEP= operand has a default (specified in the FDR Global Options) that may affect results even if the operand is not present. See SIZEKEEP= for the further description of SIZEKEEP=.

The SIZEKEEP= operand has three subparameters, a size (in tracks), a percentage and an extent count, which default to 100 tracks, 90% and 60 extents (unless you have changed the defaults in the FDR Global Options). The purpose of SIZEKEEP is to improve the efficiency of COMPAKTOR by moving and restoring as little data as possible, as long as a significant improvement can still be made in the fragmentation of the volume. The percentage is a minimum reduction in the number of free space areas on the volume which must be produced for SIZEKEEP= to be honored. By default, COMPAKTOR must be able to reduce the free area count by 90%.

The size sub-parameter of SIZEKEEP= causes COMPAKTOR to look for contiguous groups of allocated tracks which are at least that large (by default, 100 tracks or larger). These groups may contain multiple data sets, but they are bounded by an existing free space area on either side. COMPAKTOR marks these groups unmovable and then executes each placement algorithm to move other data sets and see if the required percentage reduction in free areas can be achieved. If so, an algorithm is chosen. If not, then part of that list of unmovable groups is made movable (the smaller groups) and the algorithms are driven again. This repeats until the required percentage is achieved or until the list is empty.

The third sub-parameter, extent count, controls SIZEKEEP= processing of multi-extent data sets. Data sets with more than the specified number of extents (default 60) are not considered to be part of any SIZEKEEP track group, so they are movable. If the unmovable groups chosen by SIZEKEEP= contain one or more extents of a multi-extent data set, but not all of its extents, COMPAKTOR may move the other extents of the data set but does not combine them. In other words, the actions of SIZEKEEP= may cause COMPAKTOR to leave some data sets in multiple extents where it would normally combine them.

You can specify SIZEKEEP=0 to nullify the operation of SIZEKEEP, but this may significantly increase the elapsed time of the COMPAKTion while providing little additional benefit. For Fast COMPAKTion (TYPE=FASTCPK) SIZEKEEP=0 may still keep some groups over 100 tracks as long as the free space areas are reduced to 1 or 2.

Tip

We recommend that in most cases you use the default SIZEKEEP= of 100,90,60.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*