Statistics Files

The Statistics facility logs statistics to VSAM file pairs. Each file pair consists of the following:
  • A VSAM entry-sequenced cluster
  • A VSAM key-sequenced cluster

The default and minimum configuration uses two such file pairs, making four VSAM files. The maximum number of file pairs you can use is twenty. Specify the number of file pairs and the VSAM cluster names with the STAT.DSN.BASE and STAT.FILE.PAIRS initialization parameters.

The RECORDS parameter of the Access Methods Services DEFINE command for the ESDS cluster specifies the maximum number of records each file pair can contain. The maximum number of statistics records available is the sum of the values in the RECORDS parameters for all the statistics ESDS clusters. For example, if you determine that your system needs space for 15,000 statistics records, you can define three file pairs containing 5,000 records each, or two file pairs containing 7,500 records each.

Note: IBM® Connect:Direct® does not support extended-format, extended-addressing ESDS Statistics datasets.

Within each file pair, IBM Connect:Direct writes statistics records to the ESDS cluster. IBM Connect:Direct uses the KSDS cluster to maintain index information about the records in the ESDS. Whenever either file of the pair becomes full, the entire pair is considered full, and the system initiates a switch to the next pair in the sequence. Because the file pair is full when one file fills to capacity, it is important that you size the ESDS and KSDS in a file pair appropriately, relative to each other. Specifying appropriate file sizes reduces the waste of excessive space.

Statistic File Recommendation

The following tables describes minimum, optimum and maximum values for the VSAM attributes that impact the statistic file space and its performance.

CI Size Minimum Size Optimum Size Maximum Size
ESDS (D) 2048 32768 32768
KSDS (D) 4096 4096 32768
KSDS (I) 2560 4096 32768
BUFSP (Cluster) Minimum Size Optimum Size Maximum Size
ESDS (D) 2 * CI size (D) 2 * CI size (D) Storage Limit
KSDS (D)
2 * CI size (D) +
1 * CI size (I)
2 * CI size (D) +
1 * CI size (I)
Storage Limit
Note: The actual maximum BUFSP is limited by your system’s storage constraints. DEFINE allows you to specify BUFSP(16000000), but most programs would ABEND when they OPEN the file.
Note: Decreasing the BUFSP below the optimum size can cause significant performance degradation. Increasing the BUFSP far above the optimum provides no noticeable gain in performance. However, increasing it a little above the optimum provides some extra headroom.

The frequency with which IBM Connect:Direct writes records to the KSDS cluster of a file pair depends on usage patterns at each site and the ESDS CI size. The greater the ESDS CI size, the fewer records IBM Connect:Direct writes to the KSDS. However, a larger ESDS CI size also requires more statistic file buffer storage in the IBM Connect:Direct address space.

The following table summarizes results from running the KSDS rebuild program against ESDS clusters of various CI sizes. Each ESDS cluster was defined with the optimum BUFSP for its CI size, and each cluster contained identical statistic records. These results are suggestive of the performance differences due to ESDS CI size which the DTF will experience when writing statistics records and reading them for the SELECT STATISTICS command.

ESDS records KSDS CI size Data/Index ECDS CI Size

KSDS rebuild records

(CD 5.2)

KSDS rebuild records

(CD 6.0)

KSDS rebuild time

(CD 5.2)

KSDS rebuild time

(CD 6.0)

1,104,668 4K/4K 4K 705,573 1,360,564 08:26.46 15:33.28
1,104,668 4K/4K 8K 444,153 801,803 04:27.59 08:55.59
1,104,668 4K/4K 16K 282,623 477,526 02:57.60 05:28.93
1,104,668 4K/4K 32K 185,465 288,592 01:41.31 03:15.31

The default configuration provides space for 13,500 statistics records evenly divided between two file pairs. The minimum configuration provides space for 2,000 statistics records. The amount of activity in the IBM Connect:Direct system determines how frequently the statistics file pair list wraps around. It is recommended that you estimate your activity rate and allocate enough space so that the system records several days of records before a wraparound occurs. After running IBM Connect:Direct for several days, you may need to adjust the number or sizes of the statistics files to allocate the right amount of space.