• Aucun résultat trouvé

Guidelines for Use of Free space

Dans le document The information contained in this (Page 34-37)

KSDS RECORDS ESDS RECORDS

3.1 VSAM FREE SPACE AND DL/I F~E~ SPACE

3.1.4 Guidelines for Use of Free space

Since each installation will have different data base structures and proc-essing profiles, i t is not possible to give specific rules and algorithms for the determination of the amount of free space which should be allo-cated. Therefore, this section is merely intended to make the reader aware of some of the considerations to be taken into account when specifying free space.

3.1.4.1 Free Space in KSDS

KSDS free space is applicable to SHISAM data bases, the Primary component of HISAM data bases and to INDEX data bases. In the case of an INDEX data base which is used as a Secondary Index and which has nonunique key~, i t applies only to the KSDS portion of the data base. The use of V5AM free space with these types of data base can be an important factor in perform-ance.

When defining the amount of CI and CA free space for a KSDS, the user should take into account the fact that too little free space may cause a large number of control interval and control area splits. This wil! result in poor performance because:

• CI/CA splits are time consuming since they involve the movement of data between control intervals and cause index ~odification.

• After a split, the records are no longer physically in sequence which will cause extra time to be spent in ~equential processing.

• CA splits will increase seek time for direct reque~ts because new CAs are placed at the end of the data set.

In order to avoid these problems, the user should specify. sufficient free space to allow for the predicted insert level for the data base. It will usually be possible to make a fairly good estimate of the insert activity to be expected in a data base but, if not, then careful monitoring of the data base in the operational environment will provide the nece~~ary infor-mation on which to base the calculation of free space percentages.

When allocating free space, i t is also neces~ary to consider the process-ing mode of the data base. VSAM free space performs its function best for direct insert requests. If the data base is processed in sequential mode with mass sequential inserts being done, then free space may be relatively useless or even harmful. This is because mass sequential insertion pre-serves the free space percentages as specified in the definition of the cluster. Contiguous records are loaded into a coritrol interval until the free space threshold is reached, then the next control interval will be used (no split). This may lead to unwanted free space between contiguous records.

There are also some other problems that may result from an overly generous allocation of free space. These problems are primarily due to the fact that the records will be spread over a larger amount of DASD space when imbedded free space is included. This may cause:

• Increased seek time because of the larger number of cylinders occupied by the data set.

• Slower direct retrieval because of extra index levels resulting fro~

the fact that more index records are needed to reference the same amount of data when i t is spread over a larger number of control areas.

From the above discussion, i t can be seen that selection of the VSAM free

sp~ce percentages is

a

~~tter

of

b~lance. Too little and too much free space can both have adverse effects on the performance of the data base.

It is, however, possible to monitor the performance of the data bases with both IMS/VS utilities and the Access Method Services

LISTCAT

command (ex-amples are shown in "Statistical Information" on page 125). If a large number of CI and CA splits are occurring, then the free space should be increased. Should i t be found that frequent mass sequential inserts are being performed or that direct processing is slowed due to extra seek time or index search, then free space should be decreased.

The free space percentages for VSAM data sets can be easily changed by making use of the

ALTER

command of Access Method Services (the newly spec-ified free space value has no effect for the existing data in the data set but will be used for future sequential insertions). For further informa-tion on ALTER, refer to

OS/VSl ACCESS HETHOD SERVICES, GC26-3840

or

OS/VS2 ACCESS METHOD SERVICES, GC26-3841.

VSAM free space definition (for KSDS) is described in section "FREESPACE"

on page 73.

3.1.4.2 Free Space in ESDS

Free space in an ESDS applies only to HDAM data bases and to the Data com-ponent of an HIDAM data base. Although other IMS/VS data base organiza-tions use ESDS, only the Hierarchical Direct organizaorganiza-tions may be defined with the

FRSPC

parameter to specify DL/I free space.

The basic purpose of free space in HDAM and HIDAM is to allow the space search process to find space for a new segment close to the segment pre-ceding i t in hierarchical sequence. This is intended to keep the physical storage of the data base in as close to logical sequence as possible.

Thus, DL/I free space should be specified so that i t can handle the expected number of insertions to the data base. The expected insertion level is usually easily determined by a simple analysis of the applica-tions running against the data base.

If insufficient DL/I free space is allocated, then the following problems may be expected:

• Long insert times due to the space" search process having to spend a great deal of time to find the proper location for new segments.

• Poor retrieval performance because of the fragmentation of data base records across the DASD space, resulting in a large amount of seeking.

• Very slow sequential processing of the data base because of the frag-mentation of data base records and loss of logical sequence.

There are also problem areas that may be encountered when too much free space has been specified. These problems ar~ more severe in HDAM than in HIDAM because of the use of the randomizing routine rather than an Index.

For an HIDAM data base, the segments are initially loaded in hierarchical sequence and the Index points to the location of each root segment. The HDAM randomizing routine returns a control interval" number and a Root Anchor Point (RAP) number and it is expected that the root segment should be placed in that control interval and pointed to by the indicated RAP. If there is not enough space to insert a root segment into the specified CI, then it is placed elsewhere, as determined by the space search process, and the RAP is set to point to the actual location of the segment.

When a small value is specified for FBFF, requesting a high frequency of free control intervals, it makes it much more likely that root keys will randomize to a eI which must be left free. Therefore, they must be placed in another location. If FSPF is high, then fewer segments can be loa~ed

into each control interval leading to the excess segments being spilled into some other control interval. These displaced segments will take up space in other CIs and may prevent segments which should be placed in those CIs from being inserted in their proper location so that they too are displaced. This displacement will cause other 'collisions' with the result that, in extreme cases, very few segments will be located in the eI to which their keys have randomized and the data base records will be bad-ly scattered. Such an effect leads to lengthy insert processing and poor retrieval times.

The IMS/VS utilities may be used to determine if this situation has arisen by reporting the frequency with which segments are found out of their 'home' (randomized) CIs. In this case, it may be possible to reduce the problem by cutting down on the amount of free space specified for the data base and reloading it.

DL/I free space (for ESDS) specification is described in section "FRSPC"

on page 58.

Dans le document The information contained in this (Page 34-37)