SAS insufficient memory error

Frequent Contributor
Posts: 102

SAS insufficient memory error

Just had a quick question regarding SAS. When I run firm/year fixed regression, I get:

ERROR: The SAS System stopped processing this step because of insufficient memory.

I do have 1800+ firms, but is this because my computer’s memory is not big enough?

Super User
Posts: 23,776

Re: SAS insufficient memory error

Or the settings. What proc are you running? 

You can look at the memsize option to see what it's set at and if you can increase it to avoid the problem.

SAS(R) 9.2 Companion for Windows, Second Edition

Frequent Contributor
Posts: 102

Re: SAS insufficient memory error

i am running

proc surveyreg data=m11; cluster cusip; .....

with cluster at firm level.

Super User
Posts: 23,776

Re: SAS insufficient memory error

I'd try the memsize option.

options memsize=max;

Super User
Posts: 10,280

Re: SAS insufficient memory error

There are several possible limitations coming into play

- physical RAM, most often not the culprit

- memory layout of the OS, including swap/paging space

- user specific limits imposed by the OS; caution: with a workspace server, these are (may be) inherited from the user running the object spawner!

- SAS settings: config files or command line

You will have to check these, most likely the solution is in #4 or #3

Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Trusted Advisor
Posts: 3,215

Re: SAS insufficient memory error

At windows (destktop) by default SAS is, should be, allowed to used all memory present in the desktop.

SAS(R) 9.4 Companion for Windows, Third Edition  The only place it can be changed as at startup (sas-config or parameter sas-script)

At servers it is usual to have limits set to allow it as multi-user processing with a lot of processes. A server can have 256Gb or 2Tb of internal memory 64 cores where your desktop is coming with 8 of may be 16 using 8 cores. Sometimes with VDI your Windows session is stripped to less than 3Gb with a single core. This is according the IT dogma that users do not run heavy processes.

With sas you can see your memory settings and usage.

There are more memory options like SAS(R) 9.4 Companion for Windows, Third Edition (maxmemquery) setting a s size of allocation blocks.

proc options group=memory   Base SAS(R) 9.4 Procedures Guide, Third Edition will give your sas settings.

What is your hardware configuration? You SAS version

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 5 replies
  • 4 in conversation