Previous Page | Next Page

System Options under UNIX

MEMSIZE System Option: UNIX



Specifies the limit on the total amount of virtual memory that can be used by a SAS session.
Default: value set in SAS configuration file !SASROOT/sasv9.cfg
Valid in: configuration file, SAS invocation, SASV9_OPTIONS environment variable
Category: System administration: Memory
PROC OPTIONS GROUP= MEMORY, PERFORMANCE
UNIX specifics: all

Syntax
Details
The Basics
Setting MEMSIZE to MAX
Setting MEMSIZE to 0
See Also

Syntax

-MEMSIZE n | nK | nM | nG | nT | hexX | MAX

n | nK | nM | nG | nT

specifies the limit in multiples of 1 (bytes); 1,024 (kilobytes); 1,048,576 (megabytes); 1,073,741,824 (gigabytes); or 1,099,511,627,776 (terabytes). You can specify decimal values for the number of kilobytes, megabytes, or gigabytes. For example, a value of 16.5M specifies 17,301,504 bytes, and a value of .25G specifies 268,435,456 bytes.

hexX

specifies the amount of memory as a hexadecimal value. You must specify the value beginning with a number (0-9), followed by hexadecimal characters (0-9, A-F), and then followed by an X. For example, 0F00000x sets the value of the MEMSIZE option to 15,728,640 bytes. A value of 0x is equivalent to using the MAX value.

MAX

specifies to set the memory size to the largest reasonable value depending on the amount of physical memory and paging space that is available at the time that SAS is started.


Details


The Basics

The MEMSIZE system option specifies the total amount of memory that is available to each SAS session, and places an enforced limit on the amount of virtual memory that SAS can dynamically allocate at any one time. Too low a value will result in out-of-memory conditions. By contrast, the REALMEMSIZE and MAXMEMQUERY system options, the SORTSIZE= option in the SORT procedure, and the SUMSIZE= option in the SUMMARY procedure all provide for procedure tuning.

If you specify an unreasonably small numeric value (for example, 6K) for MEMSIZE, the setting of this option automatically increases to a minimum reasonable value that will enable SAS to start. If you specify a numeric value in excess of 4,294,967,295 on a 32-bit version of SAS, then the setting of MEMSIZE will be reduced to 4,294,967,295.

Numeric values in excess of 9,223,372,036,854,775,807 bytes will be rejected as invalid and will prevent SAS from starting.

SAS does not automatically reserve or allocate the amount of memory that you specify in the MEMSIZE system option. SAS will use only as much memory as it needs to complete a process. For example, a DATA step might require only 20M of memory, so even though MEMSIZE is set to 500M, SAS will use only 20M of memory. While your SAS jobs are running, you can monitor the effect of larger memory settings by using system monitoring tools, such as VMSTAT and top.


Setting MEMSIZE to MAX

Setting MEMSIZE to MAX is reasonable only if no processes that consume large amounts of memory are likely to become active after SAS has started. For example, if multiple instances of SAS are running concurrently, and all of the sessions were started with a MEMSIZE value of MAX, then one or more of these sessions can encounter out-of-memory conditions, or the operating system can run out of available paging space. MEMSIZE=MAX calculates a value that would help prevent the system from paging if all of the memory were allocated.

If you set MEMSIZE to the maximum amount of memory that is reasonably attainable, some procedures scale themselves to the available memory.

Note:   Setting MEMSIZE to MAX is the same as setting MEMSIZE to 0.  [cautionend]


Setting MEMSIZE to 0

The optimal setting for this option depends on the other applications that are running and the system resources available at your site. The amount of memory available to SAS processes can also be limited by your system administrator.

To determine the optimal setting of MEMSIZE, run the SAS procedure or DATA step with MEMSIZE=0 with the FULLSTIMER option. Note the amount of memory that is used by the process, and then set MEMSIZE to a larger amount.

Note:   Setting MEMSIZE to 0 is the same as setting MEMSIZE to MAX.  [cautionend]


See Also

Previous Page | Next Page | Top of Page