BUFNO= System Option

Specifies the number of buffers to be allocated for processing SAS data sets.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Categories: Files: SAS Files

System administration: Performance

PROC OPTIONS GROUP= SASFILES

PERFORMANCE

Note: This option can be restricted by a site administrator. For more information, see Restricted Options.
See: BUFNO System Option: UNIX in SAS Companion for UNIX Environments

BUFNO System Option: Windows in SAS Companion for Windows

Syntax

BUFNO=n | nK | nM | nG | hexX | MIN | MAX

Syntax Description

n | nK | nM | nG
specifies the number of buffers to be allocated in multiples of 1: 1,024 (kilo); 1,048,576 (mega); 1,073,741,824 (giga). For example, a value of 8 specifies 8 buffers, and a value of 3m specifies 3,145,728 buffers.
Tip:Use the notation that best fits the memory size of your system.
hexX
specifies the number of buffers as a hexadecimal value. You must specify the value beginning with a number (0–9), followed by an X. For example, the value 2dx specifies 45 buffers.
MIN
sets the minimum number of buffers to 0, which causes SAS to use the minimum optimal value for the operating environment. This is the default.
MAX
sets the number of buffers to the maximum possible number in your operating environment, up to the largest four-byte, signed integer, which is 231–1, or approximately 2 billion.

Details

The number of buffers is not a permanent attribute of the data set; it is valid only for the current SAS session or job.
BUFNO= applies to SAS data sets that are opened for input, output, or update.
Using BUFNO= can improve execution time by limiting the number of input/output operations that are required for a particular SAS data set. However, the improvement in execution time comes at the expense of increased memory consumption.
You can estimate the number of buffers that you need from the data set page size and the amount of memory in your system. The data set page size can be specified by the BUFSIZE= system option or by the BUFSIZE= data set option. If the default is used, SAS uses the minimal optimal page size for the operating environment. You can find the page size for a data set in the output of the CONTENTS procedure. Once you have the data set page size and the amount of memory available, you can estimate the number of buffers that you need. If the number of buffers is too large, SAS might not have enough memory to process the DATA or PROC step. You can change the page size for a data set by re-creating the data set by using the BUFSIZE= data set option.
Operating Environment Information: Under the Windows operating environment, if the SGIO system option is set, the maximum number of bytes that can be processed in an I/O operation is 64MB. Therefore, number-of-buffers x page-size <= 64MB.

Comparisons

  • You can override the BUFNO= system option by using the BUFNO= data set option.
  • To request that SAS allocate the number of buffers based on the number of data set pages and index file pages, use the SASFILE statement.

See Also

Data Set Options:
BUFNO= Data Set Option in SAS Data Set Options: Reference
Procedures:
CONTENTS Procedure in Base SAS Procedures Guide
Statements:
SASFILE Statement in SAS Statements: Reference
System Options: