Chapter Contents

Previous

Next
SAS Companion for the Microsoft Windows Environment

Windows Features that Optimize Performance


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

  1. selecting

    START
    [arrow]
    Settings
    [arrow]
    Control Panel
    which displays Control Panel window.

  2. clicking on the System icon within the Control Panel window. This displays the System Properties window.

  3. selecting the [Performance] tab within the System Properties window.

  4. drag the Boost arrow to alter the performance response time for the foreground application.

To optimize the Windows NT performance, alter the application performance boost using these guidelines:

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.

If your PC has multiple processors, SAS takes advantage of symmetric multiprocessing (SMP) with Version 8 I/O enhancements. Larger amounts of read-ahead processing is done for procedures that have large amounts of sequential data access on data stored on Windows NT Server. This occurs more on system with extra processing power to service NT and it's disk cache.

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.

Processing SAS Libraries in Extended Server Memory Architecture Memory

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.

CAUTION:
If you do not copy the library in Extended Server Memory to disk after processing is complete, you will loose any changes made to the library when the SAS session ends.   [cautionend]
You designate a library to be processed in ESMA memory using the MEMLIB option in the LIBNAME statement. All librefs, including a libref to the WORK directory, must have a valid disk directory. For more information on the MEMLIB option, see LIBNAME

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;

Using Extended Server Memory Architecture as a SAS System File Cache

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:

  1. With the right mouse button, click on the My Computer icon on the desktop, and select Properties....

  2. Select the Performance tab. The performance status should report that your system is configured for optimal performance. If it is not, use the Advanced Settings to adjust the configuration accordingly.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.