IT Management

Are You Reorganizing Your VSAM Files Too Often?

4 Pages


In some cases, there is no free CI available in the CA. In this case, VSAM needs to create free CIs within the next highest level in its file organizational hierarchy — and a CA Split is used to create the need-  ed free space. A CA is a group of CIs stored physically near each other and indexed by a single Sequence Set (lowlevel) Index record. Within a CA, some number of whole CIs can be left as CA free space during initial load, and will provide space to be used by VSAM when CI Splits are needed.

When an insert is to be done, but no free space exists in the target CI, and no free CI exists in the CA, a CA Split is required. This is similar to a CI Split, but is much more time-consuming.

A CA is a group of CIs that can contain a large number of physical records or blocks. A CA can be as large as one cylinder of space on the DASD device in use. For example, for an IBM 3390 device (or one of its many equivalents) with 4,096-byte CIs, VSAM will write 12 CIs per track and 180 CIs per cylinder for a total of 720KB. If the primary and secondary allocation amounts for this file are each larger than one cylinder, then the size of one cylinder will be used for the CA and it will contain 180 CIs.

If you had a file with frequent sequential processing, you might have chosen a larger CI size — for example, 16,384 bytes. Then, the CA size would only contain 45 CIs (three per track) for a total of 720KB. Had you chosen 18,432- byte CIs, VSE/VSAM could have also stored three of these on each track, still giving 45 CIs per CA, but 810KB per cylinder. DFP/VSAM may use extended format when writing DASD blocks, and therefore, may be restricted to three 16KB CIs per track. Larger CI sizes:

  • Improve performance of VSAM sequential performance
  • Greatly speed processing of inserts when CA Splits are needed
  • Use DASD space more efficiently.

It is often thought that shorter CIs are critical to direct performance. With today’s DASD subsystems, FICON and ESCON channels, and the ability to cache large numbers of records in main storage buffers, the gain in I/O response time from shorter CI sizes is much less important than it was just 10 years ago.

First, let’s look at the contents of a VSAM Control Area (see Figure 2). This illustration shows that two free CIs exist in the CA and can be used for CI Splits without the need for CA Split processing. When two CI Splits have occurred in this CA, there will be no free CIs and then a CA split will be needed.

VSAM’s insertion strategy, described previously, applies to CA Splits as well as CI Splits — VSAM attempts to keep a significant number of CIs together in a group to improve processing performance.

Unlike CI Splits, CA Splits can take a lot of processing and I/O resources. The general outline of CA Split processing is similar to CI Split processing. In a CA Split, VSAM performs the following steps:

4 Pages