Threaded Application Processing

Some applications receive data faster than they can perform the necessary processing on that data. These applications are sometimes referred to as CPU-bound. For CPU-bound applications, the solution is to increase processing power. Support for SMP computers provides access to threaded processing for CPU-bound applications. Even if your application is not currently CPU-bound, if you increase the amount of data that can be delivered to an application, you naturally increase the need for faster processing of that data. Modifying your application to process data in threads solves this problem.
For SAS 9, certain procedures such as SORT and MEANS have been modified so that they can thread the processing through multiple CPUs, if they are available. In addition, threaded processing is being integrated into a variety of other SAS features in order to improve performance. For example, when you create an index, if sorting is required, SAS attempts to sort the data using the thread-enabled sort.
Some types of processing are not appropriate for threading, while other types of processing can benefit greatly. For example, sorting can be performed in multiple threads by dividing the sorting process into separately executable sorting processes. One or more of these threads can process data in each CPU. The sorted data from each thread is then joined together and written to the output data set. Sorting can be performed in threads, but the join process and the output process are nonthreadable processes. Even with applications that are highly threadable processes, simply providing additional disks and CPUs might not improve performance. That is, a particular algorithm can benefit by using four CPUs but cannot benefit an equal amount by adding four more CPUs.
For SAS procedures that are thread-enabled, new SAS system options are introduced with SAS 9:
CPUCOUNT=
specifies how many CPUs can be used.
THREAD|NOTHREADS
controls whether to use threads.
For documentation on the SAS system options, see SAS System Options: Reference. In addition, the documentation for each thread-enabled procedure provides more information. See Base SAS Procedures Guide.