VSAM specifications for LSR

Define VSAM buffer allocations and string settings for LSR. Specify the resource percentile and the maximum key length for LSR.

Defining VSAM buffer allocations for LSR

For files that use local shared resources (LSR), the number of buffers to be used is not specified explicitly by file. The files share the buffers of appropriate sizes in the LSR pool. The number of buffers in the pool can either be specified explicitly using the BUFFERS parameter in the file definition on the CICS® system definition data set (CSD), or you can leave it to CICS to calculate.

Use the BUFFERS parameter in CICS systems that use VSAM LSR files in CICS file control. It allows for exact definition of specific buffers for the LSR pool. The number of buffers can have a significant effect on performance. The use of many buffers can permit multiple concurrent operations, if there are the corresponding number of VSAM strings. It can also increase the chance of successful buffer lookaside with the resulting reduction in physical I/O operations.

The optimum buffer allocation involves a trade-off between increasing the I/O saving due to lookaside and increasing the real storage requirement. This optimum is different for buffers used for indexes and buffers used for data. The optimum buffer allocation for LSR is likely to be less than the buffer allocation for the same files using NSR.

The effects of these parameters can be monitored through transaction response times and data set and paging I/O rates. The settings influence both file and LSRPOOL statistics. The CICS file statistics show data set activity of the VSAM data sets. The VSAM catalog and RMF can show data set activity, I/O contention, space usage, and control interval (CI) size.

Note: From z/OS® V2.2, VSAM provides a dynamic buffer addition capability that will allocate extra buffers for an LSR pool when no buffer is available for a given VSAM request. For CICS, it is preferable to retry the request rather than allow immediate expansion of an LSR pool, so dynamic buffer addition is not enabled for CICS LSR pools.

CICS provides metrics in both statistics and monitoring that can be used to tune LSR buffer allocations. Refer to the statistics for files for the number of times that tasks were queued as a result of buffer waits. Refer to exception monitoring data to identify which transactions are forced to wait and for how long.

Defining VSAM string settings for LSR

The STRINGS parameter is used to determine the number of strings and the number of concurrent operations possible against the LSR pool, assuming that there are buffers available. The STRINGS parameter can be used in CICS systems with VSAM data sets.

The number of strings is defined by the STRNO parameter in the file definition on the CSD, which limits the concurrent activity for that particular file.

The STRINGS parameter relating to files using LSR has the following effects:
  • It specifies the number of concurrent requests that can be made against that specific file.
  • It is used by CICS to calculate the number of strings and buffers for the LSR pool.
  • It is used as the STRINGS value for the VSAM LSR pool.
  • It is used by CICS to limit requests to the pools to prevent a VSAM short-on-strings condition (note that CICS calculates the number of strings required per request).
  • A number greater than 1 can adversely affect performance for ESDS files used exclusively in write mode. With a string number greater than 1, the cost of resolving exclusive control conflicts is greater than the cost of waiting for a string. Each time exclusive control is returned, a GETMAIN is issued for a message area, followed by a second call to VSAM to obtain the owner of the control interval.

A maximum of 255 strings is allowed per pool. The effects of the STRINGS parameter can be seen in changes to the response times for each file entry. The CICS LSR pool statistics give information about the number of strings, the number of requests that waited for strings, and the maximum number of strings that were active at one time. The CICS performance data field 427, FCVSWTT, in the DFHFILE group, shows the elapsed time in which each user task waited for a VSAM string.

Examination of the string numbers in the CICS statistics shows that there is a two-level check on string numbers available: one at the data set level (see File control statistics in DFHSTUP reports), and one at the shared resource pool level (see LSR pool statistics in DFHSTUP reports).

Specifying the maximum key length for LSR

The KEYLENGTH parameter in the file definition in the CSD, or the MAXKEYLENGTH parameter in the LSR pool definition, specifies the size of the largest key to be used in an LSR pool. The KEYLENGTH parameter can be used in CICS systems with VSAM data sets. Specify the maximum key length explicitly using the KEYLENGTH parameter in the file definition on the CSD. Or leave it to CICS to determine the maximum key length from the VSAM catalog.

The KEYLENGTH parameter causes the placeholder control blocks to be built with space for the largest key that can be used with the LSR pool. Too small a specified KEYLENGTH prevents requests for files that have a longer key length. Set the key length so it is always as large as, or larger than, the largest key for files using the LSR pool.

Specifying the resource percentile for LSR

The SHARELIMIT parameter in the LSR pool definition specifies the percentage of the buffers and strings that CICS applies to the value that it calculates. The SHARELIMIT parameter can be used in CICS systems with VSAM data sets. The SHARELIMIT parameter is specified in the LSR pool definition.

The SHARELIMIT parameter is ignored if both the BUFFERS and the STRINGS parameters are specified for the pool. SHARELIMIT can be applied only to files that are allocated at initialization of the LSR pool, when the first file in the pool is opened. Therefore, it is always wise to specify the decimal STRINGS and BUFFERS for an LSR pool.