VSAM Tuning Parameters.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Previous topicNext topic

Topic Author
Amy Dogar
Registered Member
Posts: 16
Joined: Wed Jun 18, 2014 8:45 am

VSAM Tuning Parameters.

Post by Amy Dogar » Mon Mar 28, 2016 11:32 am


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.

William Collins
Global Moderator
Global Moderator
Posts: 499
Joined: Sun Aug 25, 2013 7:24 pm

Re: VSAM Tuning Parameters.

Post by William Collins » Mon Mar 28, 2016 11:55 am

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.

User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1379
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: VSAM Tuning Parameters.

Post by Robert Sample » Mon Mar 28, 2016 4:42 pm

Tuning for online access is the complete opposite of tuning for batch access so without at least that basic information tuning is futile.

Registered Member
Posts: 14
Joined: Thu Nov 26, 2015 10:51 am

Re: VSAM Tuning Parameters.

Post by Gerhard_Adam » Sat Jun 25, 2016 7:45 am

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.

Previous topicNext topic