CATCACHE=
SAS uses this option to determine the number of SAS catalogs to keep open at one
time. Increasing its value can use more memory, although this might be warranted if
your application uses catalogs that are needed relatively soon by other applications.
(The catalogs closed by the first application are cached and can be accessed more
efficiently by subsequent applications.)
For more information, see “CATCACHE= System Option” in SAS System Options:
Reference and the SAS documentation for your operating environment.
COMPRESS=
One further technique that can reduce I/O processing is to store your data as
compressed data sets by using the COMPRESS= data set option. However, storing
your data this way means that more CPU time is needed to decompress the
observations as they are made available to SAS. But if your concern is I/O and not
CPU usage, compressing your data might improve the I/O performance of your
application.
For more information, see “COMPRESS= System Option” in SAS System Options:
Reference.
DATAPAGESIZE=
Beginning with SAS 9.4, the optimal buffer page size is increased to improve I/O
performance. The increase in page size might increase the size of the data set or
utility file. If you find that the current optimization processes are not ideal for your
SAS session, you can use DATAPAGESIZE=COMPAT93 to use the optimization
processes that were used prior to SAS 9.4.
For more information, see “DATAPAGESIZE= System Option” in SAS System
Options: Reference.
STRIPESIZE=
When data is stored in a RAID (Redundant Array of Independent Disks) device, you
can use the STRIPESIZE= system option to set the I/O buffer size for a directory to
be the size of a RAID stripe. SAS data sets or utility files that are created in the
directory have a page size that matches the RAID stripe size. Using this option can
improve the performance of individual disk.
For more information, see “STRIPESIZE= System Option” in SAS System Options:
Reference.
UBUFNO=
The UBUFNO= system option sets the number of utility buffers that SAS uses to
process data sets.
For more information, see “UBUFNO= System Option” in SAS System Options:
Reference.
UBUFSIZE=
The UBUFSIZE= option sets the page size for utility files that SAS uses to process
data sets. You can improve the number of disk accesses when values of the
UBUFSIZE= option and the BUFSIZE= option are the same.
For more information, see “UBUFSIZE= System Option” in SAS System Options:
Reference.
VBUFSIZE=
The VBUFSIZE= option set the size of the view buffer. View performance can be
improved by setting the size of the view buffer large enough to gold more generated
observations. For more information, see “VBUFSIZE= System Option” in SAS
System Options: Reference and “Setting VBUFSIZE= and OBSBUF= for SAS
DATA Step Views” on page 203.
202 Chapter 12 Optimizing System Performance
Setting VBUFSIZE= and OBSBUF= for SAS DATA Step Views
When working with SAS DATA step views, specifying either the OBSBUF= data set
option or the VBUSIZE= system option can improve processing efficiency by reducing
task switching. The VBUFSIZE= system option enables you to specify the size of the
view buffer based on number of bytes. The default buffer size is 65536. The OBSBUF=
data set option sets the view buffer size based on a specified number of observations. In
either case, setting the view buffer so that it can hold more generated observations
speeds up execution time by reducing task switching.
For more information about the VBUFSIZE= system option, see “VBUFSIZE= System
Option” in SAS System Options: Reference. For more information about the OBSBUF=
data set option, see “OBSBUF= Data Set Option” in SAS Data Set Options: Reference.
Using the SASFILE Statement
The SASFILE global statement opens a SAS data set and allocates enough buffers to
hold the entire data set in memory. Once it is read, data is held in memory, available to
subsequent DATA and PROC steps, until either a second SASFILE statement closes the
file and frees the buffers or the program ends, which automatically closes the file and
frees the buffers.
Using the SASFILE statement can improve performance by
reducing multiple open and close operations (including allocation and freeing of
memory for buffers) to process a SAS data set to one open and close operation
reducing I/O processing by holding the data in memory
If your SAS program consists of steps that read a SAS data set multiple times and you
have an adequate amount of memory so that the entire file can be held in real memory,
the program should benefit from using the SASFILE statement. Also, SASFILE is
especially useful as part of a program that starts a SAS server such as a SAS/SHARE
server. For more information about the SASFILE global statement, see the SAS
Statements: Reference.
Using the DATASETS Procedure to Modify Attributes
Using the DATASETS procedure to modify variable attributes is more efficient than
using a DATA step, as long as this task is the only one PROC DATASETS has to
perform. The DATASETS procedure processes only the data descriptor information of a
data set. A DATA step processes an entire data set. For more information, see
“DATASETS” in Base SAS Procedures Guide.
Storing Variables as Characters
SAS uses eight bytes of storage for each numeric value processed in the DATA step and
one byte for each character. If you are not going to perform calculations on a variable
that contains numbers, you can save storage by defining the variable as a character
variable. When you reduce the amount of storage that is necessary for each variable, you
reduce the number of I/O operations.
Techniques for Optimizing I/O 203
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.122.82