MAXSORT’s performance can be optimized by controlling the intermediate sorts which it processes. A balance should be achieved between the number and duration of intermediate sorts. Limiting the number of sorts reduces the required tape mounts and restricting the duration of sorts decreases the interval between breakpoints.
A good rule of thumb is that each intermediate sorted data set should create from one to five volumes of input data, and the only way to determine the amount of input data is by controlling the amount of SORTWK space used. This is illustrated in the following figure.
If only 3,000 cylinders were allocated in the preceding example, 45 intermediate sorts would be performed, increasing the required tape mounts and potential for error. If 75,000 cylinders were allocated, most of the input would be processed by the first intermediate sort, delaying the first breakpoint and introducing the potential for losing data. It is crucial, therefore, to allocate a balanced amount of DASD space that will divide your file into reasonably sized segments to minimize the possibility of system error and to enhance your performance.
Before tuning MAXSORT then, a number of individual environmental elements should be considered. A study of disk and tape availability, input data file size, and virtual storage limitations will help you optimize the balance of performance and reliability.