FastSort Manual

Sorting in Parallel
FastSort Manual429834-003
6-8
How FastSort Selects Processors
For example, you have a system with eight processors, and you want to run four
subsort processes to sort the records from a large file. To allow for peak capacity, do
not load any of the processors over 60 percent. Processors number 2 and 5 are
generally 50 to 60 percent busy. Processor 0 runs the distributor-collector process
because it has the lightest load. FastSort can use the remaining processors, so you
specify them in a CPUS command:
CPUS 1,3,4,6,7
Or you can combine the CPUS and NOTCPUS commands to specify the same group
of processors:
CPUS ALL
NOTCPUS 0,2,5
ALL is the default value for CPUS, so you can use only the NOTCPUS command to
specify the same group.
The cpu-mask and not-cpu-mask parameters of the SORTBUILDPARM procedure
and the CPUS and NOTCPUS attributes of a SORT DEFINE have the same effects as
the CPUS and NOTCPUS commands.
How FastSort Selects Processors
FastSort follows these steps to select a processor for a subsort process:
1. FastSort uses the processor you specified, if any. If that processor is not available,
FastSort returns error code 76 (START OF SUBSORT PROCESS HAS FAILED).
2. If you did not specify a processor, FastSort uses the processor that runs the
primary disk process for the initial scratch volume, unless the NOTCPUS
command or the not-cpu-mask parameter of SORTBUILDPARM excludes that
processor.
3. If the processor that controls the initial scratch volume is not available, FastSort
uses any processor from the processor group. If you did not specify any
processors to use or not to use, FastSort selects from a group of all processors.
When FastSort selects processors for subsorts, it attempts to put each process in a
different processor.
4. If FastSort cannot start the subsort process in a processor it selects, for example
because the processor is down, it selects another processor from the group and
tries to start the process in the new processor.