Control Interval
A Control Interval (CI) is a fixed-length block of data that VSAM (Virtual Storage Access Method) uses as its fundamental unit for physical input/output (I/O) operations on z/OS. It is the smallest amount of data that VSAM reads from or writes to disk, containing one or more logical records along with control information. A Control Interval (CI) is the fundamental unit of data transfer and storage within a VSAM (Virtual Storage Access Method) dataset on z/OS. It is a fixed-length block of data that VSAM reads from or writes to a direct access storage device (DASD) in a single I/O operation. A CI contains one or more logical records, along with control information and potentially free space.
Key Characteristics
-
- Fixed Length: The size of a CI is defined when the VSAM dataset is created, typically ranging from 512 bytes to 32 KB, and remains constant throughout the dataset's life.
- I/O Unit: It represents the atomic unit of data transfer between auxiliary storage (DASD) and main memory buffer pools.
- Contains Records and Control Information: Each CI holds one or more logical records, along with Record Definition Fields (RDFs) describing the records and Control Interval Definition Fields (CIDFs) describing the CI itself (e.g., free space pointers).
- Free Space: CIs can be allocated with free space during dataset definition to accommodate future record insertions and updates without immediately triggering a CI split.
- Part of a Control Area: Multiple CIs are logically grouped together to form a Control Area (CA), which is the unit of secondary space allocation for VSAM datasets.
- Self-Describing: The RDFs and CIDFs within each CI allow VSAM to manage records and free space efficiently, even when records are variable length.
Use Cases
-
- Sequential Data Access: When processing VSAM datasets sequentially, VSAM reads entire CIs into buffers, allowing applications to access multiple logical records with a single physical I/O operation.
- Direct Data Access (KSDS): In Key-Sequenced Data Sets (KSDS), the index component points to the specific CI that contains a desired record, enabling efficient direct retrieval.
- Record Insertion and Deletion: VSAM manages free space within CIs to facilitate the insertion and deletion of records. If a CI becomes full during an insertion, a "CI split" occurs, moving records to a new CI.
- Performance Tuning: The selection of an optimal CI size is a critical performance tuning parameter, impacting I/O efficiency, buffer utilization, and the frequency of CI/CA splits.
Related Concepts
The Control Interval is a foundational element of VSAM, defining how data is physically organized and accessed on z/OS. It is contained within a Control Area (CA), which is a larger unit of space allocation and management. CIs hold the logical records that applications process, and they are read into and written from VSAM buffer pools in main memory, which are crucial for I/O performance. The efficiency of CI management directly impacts the overall performance of KSDS, ESDS, and RRDS datasets.
- Optimize CI Size: Select a CI size that is a multiple of the average record length and aligns with the physical block size of the underlying DASD to maximize I/O efficiency and minimize wasted space.
- Allocate Free Space: Define appropriate free space percentages for CIs (and CAs) during
DEFINE CLUSTERto accommodate anticipated record insertions and updates, reducing the frequency of performance-degrading CI and CA splits. - Monitor CI Splits: Regularly monitor VSAM statistics for excessive CI and CA splits, as these indicate insufficient free space and can severely degrade application performance. Reorganization of the dataset may be necessary.
- Tune Buffer Pools: Ensure that sufficient and appropriately sized VSAM buffer pools are allocated (e.g., via
AMPparameter in JCL orDFPparameters) to hold frequently accessed CIs, minimizing physical I/O operations.