The system options THREADS, NOTHREADS, and CPUCOUNT influence threading
throughout SAS where threading is not automatic. Some products have additional
options for controlling threading such as DBSLICE in SAS/ACCESS. The system option
THREADS is the default in all products so that threading can occur wherever use of
threading is possible and performance is improved. NOTHREADS disables threading in
Base SAS or SAS clients and in products that execute in a symmetric multi-processor
environment. Procedure statement options are provided to override the system options
Certain procedures in SAS products such as SAS/STAT, SAS/OR, SAS/ETS, SAS
Enterprise Miner, and SAS High-Performance Analytics Server procedures can execute
in either SMP mode on a SAS client, or in massively parallel processing mode in the
distributed computing environment. In SMP mode, NOTHREADS is honored, if set; if
THREADS is set, CPUCOUNT defaults to the number of threads available for
processing on the client, but can be adjusted. In MPP mode, threads are always assumed.
NOTHREADS is ignored and threading is always enabled (unless you execute from the
client SAS session or SAS Enterprise Miner). However, in MPP mode, NOTHREADS
has no effect. In most of these products, thread controls and execution mode are
specified in the PERFORMANCE statement. Refer to the SAS System Options:
Reference along with the specific SAS product documentation for information about the
threading technologies used in that product or component.
Threading in Base SAS
Some threading is automatic in Base SAS. In addition, the THREADS option is the
default for all Base SAS components that support threaded reads or threaded application
SAS uses threading technology to build indexes on SAS data files. An index can
speed performance in SAS Language WHERE processing, BY-group processing,
SET and MODIFY statements, and ARRAY processing in a DO loop. The sorting
algorithm in Base SAS, which is used in building an index, is thread-enabled by
default but can be disabled with NOTHREADS. For more information, see SAS
System Options: Reference along with the specific SAS product documentation for
information about the threading technologies used in that product or component.
Thread-Enabled Base SAS Procedures
Certain Base SAS procedures have algorithms that can take advantage of threaded
processing. These procedures are thread-enabled to split parts of the procedure
algorithm so that it executes some parts of the algorithm in threads. For example, the
SORT procedure is thread-enabled so that the sorting takes place in available threads
and each thread sorts a part of the data. The procedure then quickly generates the
data set in sorted order from the multiple threads. These procedures can also read
data in threads.
The number of threads and CPUs available to the procedures is specified by system
or procedure options CPUCOUNT and THREADS|NOTHREADS. NOTHREADS
specifies not to use threaded processing for running SAS applications that support it.
THREADS is the default. When NOTHREADS is in effect, CPUCOUNT is ignored.
Base SAS thread-enabled procedures are the following:
Threading in Base SAS 209