Previous Page | Next Page

SPD Engine Data Set Options

THREADNUM= Data Set Option

Specifies the maximum number of I/O threads the SPD Engine can spawn for processing an SPD Engine data set.
Valid in: DATA step and PROC step
Affected by system option: SPDEMAXTHREADS=
Default: the value of the SPDEMAXTHREADS= system option, if set. Otherwise, the default is two times the number of CPUs on your computer





specifies the number of threads.


THREADNUM= enables you to specify the maximum number of I/O threads that the SPD Engine spawns for processing an SPD Engine data set. The THREADNUM= value applies to any of the following SPD Engine I/O processing:

Adjusting THREADNUM= enables the system administrator to adjust the level of CPU resources the SPD Engine can use for any process. For example, in a 64-bit processor system, setting THREADNUM=4 limits the process to, at most, four CPUs, thereby enabling greater throughput for other users or applications.

When THREADNUM= is greater than 1, parallel processing is likely to occur. Therefore, physical order might not be retained in the output.

You can also use this option to explore scalability for WHERE expression evaluations.

SPDEMAXTHREADS=, a configurable system option, imposes an upper limit on the consumption of system resources and, therefore, constrains the THREADNUM= value.

Note:   The SAS system option NOTHREADS does not affect the SPD Engine.  [cautionend]

Note:   Setting THREADNUM=1 means that no parallel processing occurs, which is behavior consistent with the default Base SAS engine.   [cautionend]


The SPD Engine system option SPDEMAXTHREADS= is set to 128 for the session. A SAS macro shows the effects of parallelism in the following example:

%macro dotest(maxthr);
%do nthr=1 %to &maxthr;

data _null_;
set spde cen.precs(threadnum= &nthr);
   where occup= '022'
   and state in('37','03','06','36');
%mend dotest;

Previous Page | Next Page | Top of Page