Page 1 of 1

VSAM Tuning Parameters.

Posted: Mon Mar 28, 2016 11:32 am
by Amy Dogar
Hi,

For KSDS VSAM tuning, what are the factors I should start with. Are there some straight rules for some of the tunings or we have to every job by job? Please share your experience in this regard.

Re: VSAM Tuning Parameters.

Posted: Mon Mar 28, 2016 11:55 am
by William Collins
The biggest factor is the data and how it is used. Next is what you are tuning for? Performance (response time) or resources (like space).

If you don't know the data, and you don't know what you are tuning for, then the exercise is largely pointless. The chances of getting it correct would be almost nil.

Re: VSAM Tuning Parameters.

Posted: Mon Mar 28, 2016 4:42 pm
by Robert Sample
Tuning for online access is the complete opposite of tuning for batch access so without at least that basic information tuning is futile.

Re: VSAM Tuning Parameters.

Posted: Sat Jun 25, 2016 7:45 am
by Gerhard_Adam
The biggest factor in KSDS performance is the number of index and data buffers being used. For random access, index buffers will be important. For sequential processing, data buffers become more important.

For online access, most environments utilize a feature called Locally Shared Resources [LSR] which manages VSAM buffers in a completely different way thereby eliminating the performance issues that batch jobs may experience [although there is Batch LSR which may have limited applicability].

The first requirement is to establish how many index buffers you will need. This involves keeping the index set loaded into memory plus one for a sequence set record.

The calculation is:

#CI/CA * CISIZE ==> This gives the number of bytes per control area.

Hi-U-RBA / [bytes/CA] ==> This gives the number of control areas [which is also the number of sequence set records]

# Index records - # sequence set records = # Index set records

The #index Set records should be the number of index buffers + 1

Data buffers should generally be in the neighborhood of 5-10, which can be resolved by testing with different values to see what kinds of improvements might be observed.

Note that increasing the number of data buffers for random access will not help, just as increasing the number of index buffers for sequential processing will not help. However, a good solution when the usage is unknown is to use both values and specify the BUFSPACE in the definition. This will ensure that you will have the proper number of buffers [unless you have a really unusual file] regardless of how the program processes it.

This value can be modified using the ALTER command in IDCAMS after the file has been defined.