Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Calculating the size of an ISAM pool

The size of an ISAM pool has an effect on the performance of file processing. When optimizing/matching the pool size to the file processing to be performed, the following must be noted:

  • How many files are to be processed in the ISAM pool?

  • How are they to be processed: sequentially or non-sequentially?

  • How large are the index and data areas and/or the data blocks?

  • How many jobs may access the pool?

Calculating the size of a task-specific ISAM pool for a single file is described below. If several files are to be processed in the pool, this calculation should be repeated for each file and the results added together. If the ISAM pool is to be accessible to several jobs, the space required for each job should be calculated and these results added together. Files processed by several files at the same time (SHARUPD=YES) constitute a special case: here, the space required for the index area needs to be provided only once.

See section "Calculating the size of an ISAM file", for details of how to calculate the sizes of the index and data sections of ISAM files.

Sequential file processing

For purely sequential file processing, the pool size has virtually no effect on performance: blocks which have been processed are not needed again, and the ISAM pool can be kept very small. It should be capable of simultaneously accommodating: the control block, the necessary index blocks, and two data blocks together with any required overflow blocks. The pool size can be calculated (approximately) with the formula:

Pool size:

SIZE = 1.1 * (1 + i + 2m)

i = number of index levels in the file.
m = number of PAM pages per data block, including the overflow block; (m = n+1, n as specified in BLKSIZE=(STD,n)).

The factor 1.1 takes into account the fact that about 10% of the pool space is used for management data.

The total number of index blocks in an ISAM file is approximately the same as the number of index blocks in the lowest index level. This means, for non-sequential processing of an ISAM file, that the optimum pool size can be found by first calculating the space required for the index and then, since the pool must also hold a number of data blocks, rounding this up.

Number of index blocks in level 1:

number = LASTPG / (n * 160)

LASTPG = the number of PAM pages in the file
n = the blocking factor (BLKSIZE=(STD,n))

The value 160 is the average number of index entries in an index block.

Example: pool size

For file ISAM.B: LASTPG = 18270; ISAM.B was defined with BLKSIZE=(STD,2) and contains no overflow blocks.

LASTPG / n = 18270 / 2 = 9135

The file contains approximately 9135 data blocks.

9135 / 160 > 57

The lowest index level occupies 57 index blocks. The optimum pool size for this file would be between 60 and 70 PAM pages: it would then accommodate all of the index and several data blocks.

Small files

Small files can in many cases be held completely in the ISAM pool.

Pool size for small ISAM files:

SIZE 1.1 * LASTPG

LASTPG is the highest PAM page used by ISAM, and thus indicates the actual size of the file.

Index blocks in the ISAM pool

Ideally the ISAM pool should be able to accommodate all the index blocks. In addition, space for a data block should be provided for every job accessing the file. The space requirements can be calculated as follows:

Space requirements:

SIZE >= 1.1 * (LASTPG / (160 * BLKSIZE) + #TASK * BLKSIZE)

#TASK is the number of jobs accessing the file concurrently and BLKSIZE is the blocking factor.

Minimum pool size

Minimum pool size:

SIZE MIN = 1,1 * ((#INDEX -1 + BLKSIZE) * #TASK +1)

In addition to the block size and the number of concurrent jobs, the number of index levels (#INDEX) in a file must also be taken into account. #INDEX can be estimated as follows:

Number of index levels:

#INDEX = [ ln (LASTPG / BLKSIZE) / ln(160) ]

“ln” is the natural logarithm, while “[“ and “]” mean that the value of the entire expression should be rounded up to the next higher integer.

Pool-specific limit values

The number of files (#FILE) and the number of jobs with concurrent access (#TASK) are limited by the SIZE specification. They must comply with the following rule:

Limit values:

#FILE + #TASK <= SIZE * 1.4

The actual size value used here is the internal, rounded value, not the value specified by the user.

Example

Pool size defined in a CREPOOL macro or CREATE-ISAM-POOL: SIZE = 32. The sum of the number of open files and the number of connected jobs must not exceed 44.