bdfd1m1j | Database Administration |
The following scenario addresses selecting an optimum block size.
A TPFDF file contains subfiles that require about 800 bytes each. Some subfiles are much larger, requiring about 3800 bytes each. Select an optimum block size to balance performance considerations against storage considerations.
For good performance, the number of overflow blocks in a subfile should be as small as possible. It would be a waste of DASD space to allocate 4095-byte prime blocks to each subfile, because most of the blocks would contain only about 800 bytes of data.
However, if you are expecting a large overflow, it is probably better to use one large overflow block than to use many smaller blocks, even if this means that you may waste some DASD space. This is because the same amount of I/O processing is required to access each block, regardless of its size. The fewer blocks there are, the less I/O processing there is to be done.
You should be particularly aware of this where a high performance level is required because heavy I/O demands can reduce performance levels significantly.
If you need to check how fully the blocks are being utilized, use the ZRECP STA command.
The TPFDF product lets you define different sizes for prime blocks and overflow blocks.
Set the prime block size using the set symbol &SW00WRS. Set the overflow block size using the set symbol &SW00ARS. These set symbols are both specified in the file DSECT.
Set the prime blocks to L2 and the overflow blocks to L4. Both types of block are then of optimum size. This also ensures that the large subfiles have only 1 overflow block. If you had set the same size for overflow blocks and prime blocks, the large subfiles would have had 3 overflow blocks.
If you change block sizes after the file has been used, the TPFDF product gradually adjusts to the new block sizes as the file is changed and packed. If you want to change the block sizes immediately, use the ZUDFM OAP command.
&SW00WRS SETC 'L2' &SW00ARS SETC 'L4'
If you do not set &SW00ARS, the TPFDF product uses the prime block size (&SW00WRS) for the overflow blocks as well as for the prime blocks.
DBDEF FILE=zzzzzz,(WRS=L1,ARS=L4)