Chapter Contents |
Previous |
Next |
SAS Companion for the Microsoft Windows Environment |
Under Windows NT |
If you are using SAS under Windows NT, you can control the relative responsiveness of your SAS session by altering the application performance level. This can be done by
START | Settings | Control Panel |
To analyze the performance of your SAS applications, you can specify SAS performance counters within the NT Performance Monitor. For more on using NT Performance Monitor, see Overview.
The following is generally true in multi-processing SMP environments:
Under Windows NT Server Enterprise Edition 4.0 |
The SAS System for Version 8 can take advantage of Intel's Extended Server Memory Architecture (ESMA) to improve the performance of SAS programs that perform large amounts of I/O operations. Using Intel's PSE36 driver, the SAS System can process SAS libraries in the system memory to avoid multiple disk reads and disk writes. The SAS System also can use the additional memory as a SAS file system cache.
To use ESMA memory, you need these system components:
Only one SAS session can use the PSE36 device driver
as only one application
can open the PSE36 device driver at a time. You can monitor the usage of ESMA
memory using the NT Performance Monitor. For more information on monitoring
ESMA memory usage, see NT Performance Monitor.
SAS libraries that are well suited for processing in ESMA memory have data that are referenced or updated multiple times within a SAS session. Using the WORK library in ESMA memory is beneficial for procedures that write multiple times to large temporary files, such as PROC SORT. To designate the WORK library to use ESMA memory, you start the SAS System using the MEMLIB system option. For more information on the MEMLIB system option, see MEMLIB.
Your SAS program needs to copy the library from disk to memory. After processing the library in ESMA memory, the library must be copied back to disk.
The following example shows how to use the LIBNAME statement and the PROC COPY statement to copy a library to and from Extended Server Memory.
/* Set up two librefs, one to the library in Extended Server Memory and the other to the SAS library on disk. The library on disk contains dataset1, dataset2, dataset3 and dataset4. */ libname inmemory "g:\memlib" memlib; libname ondisk "g:\disk"; /* Copy dataset1, dataset2, dataset3, and dataset4 to Extended Server Memory */ proc copy in=ondisk out=inmemory; run; /* ...Assume dataset1 and dataset 4 are updated */ /* Save the updated datasets back to disk */ proc copy in=inmemory out=ondisk; select dataset1 dataset4; run;
You can also copy a data set to Extended Server Memory using a DATA statement, as shown in the following example:
data ondisk.dataset1; set inmemory.dataset1; run;
A SAS file cache is most useful in multiple references of data. For example, a SAS System file cache improves performance in SAS programs containing procedures that make multiple passes of the data. SAS System file caching improves performance in the following situations:
To use Extended Server Memory as a SAS System file cache, specify the MEMCACHE system option when the SAS System is started or in an OPTIONS statement. When you use the MEMCACHE system option in the OPTIONS statement, you can control which data sets use the SAS System file cache, as shown in the following example.
/* Example of controlling cached files with the options statement */ /* Assume cachelib contains 2 data sets, ds1 and ds2. */ /* Also assume ds1 and ds2 are large enough that they can not exist */ /* in the cache together. ds1 is read many times, so caching is */ /* desired. ds2 is accessed only once, so cacheing is of no */ /* benefit. By using the memcache option, ds1 is cached, and ds2 */ /* not cached. */ libname cachelib "e:\tmp"; /* Turn on full caching */ options memcache = 4; /* Read ds1 and place the data in the cache. This read could be a */ /* more useful read of the file in a real world case. */ data _null_; set cachelib.ds1; run; /* Change memcache setting to use the cache only for files that */ /* already exist in the cache. */ options memcache = 1; /* Data from ds1 will come from the cache and ds2 will not be */ /* cached. */ proc sort data=cachelib.ds1 out=cachelib.ds2; by j; run; /* Other access of ds1... */ /* All use of the cache can be ended with a memcache system */ /* option value of 0. */ options memcache = 0; /* Neither ds1 or ds2 will access the cache. */ proc sort data=cachelib.ds1 out=cachelib.ds2; by j; run;
For more information on the MEMCACHE system option, see MEMCACHE.
Under Windows |
Ensure that Windows is configured for optimal performance:
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.