FastSort Manual

Optimizing Sort Performance
FastSort Manual429834-003
9-10
Using Swap Files
Using Swap Files
A swap file is the disk file used for data swapping during a sort or merge run. Data
swapping is the process of copying data between physical memory and storage.
Swapping, or paging, occurs when the extended memory segment is larger than the
available physical memory. Swapping also occurs when processes contend for
available memory. To minimize swapping, specify less extended memory in one of the
following:
The MINSPACE, MINTIME, or SEGMENT parameter of the RUN command
The flags parameter of the SORTMERGESTART procedure
The SEGMENT attribute of a SORT or SUBSORT DEFINE
You can also move the sort process to a processor with a lighter load or more physical
memory available.
Locating the Swap File
The swap file for FastSort is always on the local node. The default swap file location is
the current scratch volume, if the scratch file is local. For remote scratch files, the
default swap volume is the volume where the program file is running.
However, for optimal performance it is best to locate the swap file on a less busy
volume. You can specify another location for a swap file in:
The SWAP parameter of the RUN command
The process-start parameter of the SORTMERGESTART procedure
The SEGMENT attribute of a SORT or SUBSORT DEFINE
The SWAP option in a parallel CREATE INDEX configuration file
Specifying a Swap File for Parallel Sorts
Each subsort in a parallel sort operation must use a distinct swap file. If more than one
subsort process uses a single swap file, disk space and contention problems can
result.
For example, if you specify a fully-qualified file name for the SUBSORT SWAP attribute
of a SORT DEFINE, you must specify a unique swap file for each subsort.
If you use the =_SORT_DEFAULTS_DEFINE to configure a parallel sort operation,
specify only a volume name for the SORT SWAP attribute. Do not specify a fully
qualified file name for this attribute.
Using VLM
The Very Large Memory (VLM) option increases the amount of extended memory
FastSort can use to sort records. If VLM is on, FastSort can use up to 127.5 MB of