Setting System Options to Improve I/O Performance
The following SAS system options can help you reduce the number of disk accesses that
are needed for SAS files, though they might increase memory usage and the SAS data
set size:
ALIGNSASIOFILES
A SAS data set consists of a header that is followed by one or more pages of data.
Normally, the header is 1K on Windows and 8K on UNIX. The
ALIGNSASIOFILES system option forces the header to be the same size as the data
pages so that the data pages are aligned to boundaries that allow for more efficient
I/O. The page size is set using the BUFSIZE= option.
For more information, see “ALIGNSASIOFILES System Option” in SAS System
Options: Reference and the SAS documentation for your operating environment.
BUFNO=
SAS uses the BUFNO= option to adjust the number of open page buffers when it
processes a SAS data set. Increasing this option's value can improve your
application's performance by allowing SAS to read more data with fewer passes;
however, your memory usage increases. Experiment with different values for this
option to determine the optimal value for your needs.
Note: You can also use the CBUFNO= system option to control the number of extra
page buffers to allocate for each open SAS catalog.
For more information, see “BUFNO= System Option” in SAS System Options:
Reference and the SAS documentation for your operating environment.
BUFSIZE=
When the BASE engine creates a data set, it uses the BUFSIZE= option to set the
permanent page size for the data set. The page size is the amount of data that can be
transferred for an I/O operation to one buffer. The default value for BUFSIZE= is
determined by your operating environment. Note that the default is set to optimize
the sequential access method. To improve performance for direct (random) access,
you should change the value for BUFSIZE=.
Whether you use your operating environment's default value or specify a value, the
engine always writes complete pages regardless of how full or empty those pages
are.
If you know that the total amount of data is going to be small, you can set a small
page size with the BUFSIZE= option, so that the total data set size remains small and
you minimize the amount of wasted space on a page. In contrast, if you know that
you are going to have many observations in a data set, you should optimize
BUFSIZE= so that as little overhead as possible is needed. Note that each page
requires some additional overhead.
Large data sets that are accessed sequentially benefit from larger page sizes because
sequential access reduces the number of system calls that are required to read the
data set. Note that because observations cannot span pages, typically there is unused
space on a page.
“Calculating Data Set Size” on page 206 discusses how to estimate data set size.
For more information, see “BUFSIZE= System Option” in SAS System Options:
Reference and the SAS documentation for your operating environment.
Techniques for Optimizing I/O 201