The MEMSIZE system option
limits the total amount of memory that is available to each SAS session.
It places an enforced limit on the amount of virtual memory that SAS
can dynamically allocate at execution. If MEMSIZE is set too low,
your jobs will fail, and an error will appear in the SAS log indicating
that insufficient memory was available. 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 MEMSIZE (for example, 6K), then the setting
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 automatically decreases 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 uses only as much memory as it needs to complete
a process. For example, a DATA step might require only 20 MB of memory,
so even though MEMSIZE is set to 500 MB, SAS will use only 20 MB of
memory.
While your SAS jobs are running, you can monitor the effects of larger
memory settings by using system monitoring tools, such as VMSTAT and
top. With
some tools, address space might be allocated to memory, but pages
might not be assigned to that memory. These tools will report a higher
value than real memory actually used.