THREADS System Option

Specifies that SAS uses threaded processing if available.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: System administration: Performance
PROC OPTIONS GROUP= PERFORMANCE
Note: This option can be restricted by a site administrator. For more information, see Restricted Options.

Syntax

Syntax Description

THREADS
specifies to use threaded processing for SAS applications that support it.
Interaction:If THREADS is specified either as a SAS system option or in PROC SORT and another program has the input SAS data set open for reading, writing, or updating using the SPD engine, then the procedure might fail and write a subsequent message to the SAS log.
NOTHREADS
specifies not to use threaded processing for running SAS applications that support it.
Interaction:When you specify NOTHREADS, CPUCOUNT= is ignored unless you specify a procedure option that overrides the NOTHREADS system option.

Details

The THREADS system option enables some legacy SAS processes that are thread-enabled to take advantage of multiple CPUs by threading the processing and I/O operations. Threading the processing and I/O operations achieves a degree of parallelism that generally reduces the real time to completion for a given operation at the possible cost of additional CPU resources. In SAS 9 and SAS 9.1, the thread-enabled processes include
  • Base SAS engine indexing
  • Base SAS procedures: SORT, SUMMARY, MEANS, REPORT, TABULATE, and SQL
  • SAS/STAT procedures: GLM, LOESS, REG, ROBUSTREG.
For example, in some cases, processing small data sets, SAS might determine to use a single-threaded operation.
Set this option to NOTHREADS to achieve SAS behavior most compatible with releases before to SAS 9, if you find that threading does not improve performance or if threading might be related to an unexplainable problem. See the specific documentation for each product to determine whether it has functionality that is enabled by the THREADS option.

Comparisons

The system option THREADS determines when threaded processing is in effect. The SAS system option CPUCOUNT= suggests how many system CPUs are available for use by thread-enabled SAS procedures.

See Also

Support for Parallel Processing in SAS Language Reference: Concepts