Choosing HDAM or PHDAM options

In an HDAM or a PHDAM database, the options that you choose can greatly affect performance.

The options discussed here are those you specify in the RMNAME keyword in the DBD statement or when using the HALDB Partition Definition utility. The following figure shows the format for specifying the RMNAME parameter. The definition list that follows explains the meaning of mod, anch, rbn, and bytes.

RMNAME=(mod,anch,rbn,bytes)
mod
Name of the randomizing module you have chosen
anch
Number of RAPs in a block or CI
rbn
Number of blocks or CIs in the root addressable area
bytes
Maximum number of bytes of a database record to be put in the root addressable area when segments in the database records are inserted consecutively (without intervening processing operations)

Minimizing I/O operations

In choosing these HDAM or PHDAM options, your primary goal is to minimize the number of I/O operations it takes to access a database record or segment. The fewer I/O operations, the faster the access time. Performance is best when:

  • The number of RAPs in a block or CI is equal to the number of roots in the block or CI (block or CI space is not wasted on unused RAPs).
  • Unique block and RAP numbers are generated for most root segments (thereby eliminating long synonym chains).
  • Root segments are stored in key sequence.
  • All frequently used dependent segments are in the root addressable area (access to the root addressable area is faster than access to the overflow area) and in the same block or CI as the root.

Your choice of a randomizing module determines how many addresses are unique for each root and whether roots are stored in key sequence. In general, a randomizing module is considered efficient if roots are distributed evenly in the root addressable area. You can experiment with different randomizing modules. Try various combinations of the anch, rbn, and bytes operands to see what effect they have on distribution of root segments.

Maximizing packing density

A secondary goal in choosing HDAM or PHDAM options is to maximize packing density without adversely affecting performance. Packing density is the percentage of space in the root addressable area being used for root segments and the dependent segments associated with them. Packing density is determined as follows:

Packing density = 
( Number of roots  x  root bytes ) / 
( Number of CIs in the root addressable area  x  Usable space in the CI )
root bytes
The average number of bytes in each root in the root addressable area.
Usable space in the CI
The CI or block size minus (as applicable) space for the FSEAP, RAPs, VSAM CIDF, VSAM RDF, and free space.

Packing density should be high, but, as the percentage of packing density increases, the number of dependent segments put into overflow storage can increase. In addition, performance for processing of dependent segments decreases when they are in overflow storage. All of the operands you can specify in the RMNAME= keyword affect packing density. So, to optimize packing density, try different randomizing modules and various combinations of the anch, rbn, and bytes operands.