BookmarkSubscribeRSS Feed
cstopp
Calcite | Level 5

Greetings,

I've run into an insufficient memory issue when running exact logistic (PROC LOGISTIC).  

 

I've been reviewing the boards and tried out the solutions I've run across so far, setting:

- MEMSIZE: 3GB

- MEMMAXSZ: 3GB

These were achieved - and confirmed via PROC OPTION - by setting my SAS 9.3 shortcut to:

"C:\Program Files\SASHome\SASFoundation\9.3\sas.exe" -CONFIG "P:\My SAS Files\9.3\sasv9.cfg" -memsize 3000M -memmaxsz 3000M

 

However, in watching my Windows Task Manager, I am still seeing the Memory top out at about 1.76GB before ending and giving me the error message - which is approximately where it had been topping out prior to my changes to MEMSIZE and MEMMAXSZ. This has also occurred whether the total physical memory (at bottom of the Task Manager) reads 83% or 93%.  I can understand there being issues at the latter, which is why I closed most of the remaining applications.

Am I missing another option that needs to change to allow that 1.76GB to creep higher toward the intended maximum of 3GB?

 

I understand why the analyses will be a memory drain given their associated sample size and models, but some of the set I'm examining have sufficient memory and I'd like to max out SAS's memory allocation in the event it will help get them all to run.

Thanks in advance for any assistance!

 

Processor: Intel Core i5-3570 3.40GHz

32-bit OS with 4GB RAM (sadly...work allocation) 

4 REPLIES 4
DartRodrigo
Lapis Lazuli | Level 10

Hi mate

Maybe try to use:

 

options compress=yes reuse=yes;

Maybe this can compress a little your results.

Or try MEMSIZE System Option: Windows

 

Hope this helps

DartRodrigo
Lapis Lazuli | Level 10

@cstopp, check out...

By @ChrisHemedinger

 

SAS manages the memory for you, so it's similar to Java or .NET in that way. But there isn't a garbage collection mechanism per se. SAS programs consist of a series of "steps" -- the DATA step and PROC steps (for SAS procedures). For the most part, memory is allocated as needed during the running step, then released when the step is complete.

 

Some SAS procedures can use a lot of memory during the course of their work, and you can run out of memory when working with large data or data sets with large cardinality. For example, PROC FREQ can compute n-way frequencies quickly, but if the variables you're analyzing have lots of distinct values, you can bump into memory limits. When this happens, SAS will issue an ERROR message to the SAS log indicating that there wasn't enough memory to complete the operation.

 

The SAS DATA step also offers some constructs that are inherently memory-dependent. The most popular is thehash object, which allows you to load lots of data values into memory and manipulate them quickly. It's good for building fast data management algorithms, as long as the data values can fit into memory.

 

Finally, when we talk about memory management in SAS, we also have to address the WORK area: the temporary scratch space on disk where SAS can write files as intermediate results while SAS procedures run. In practice, most SAS programs that deal with large data sets will run into WORK space limitation before they hit memory constraints. On administered SAS environments, it's important to ensure that SAS programs have access to enough WORK space (ideally with fast I/O performance) to accomplish their work.

 

For more admin-friendly tips, see this series of blog posts from my colleague Margaret Crevar.

 

Check out this How does memory management work in SAS?

 

SASKiwi
PROC Star

I suspect that having 32-bit Windows is part of the problem. 2GB is close to the limit for 32-bit Windows apps. Do you have access to 64-bit Windows and SAS? You should be able to go a lot higher with that combination.

 

Failing that can you simplify you LOGISTIC program to use less memory?

cstopp
Calcite | Level 5

Thank you all for your feedback - it is certainly appreciated.

I will try a combination (e.g. adding the options, reducing the temp work folder contents) to see what can be had and keep reading.  Based on what I've seen, I feel I'm on the cusp of getting there, which is why I joined to ask.

Regarding the memory - yes, I'm confident based on work at a previous employer that a 64bit and corresponding bump in available memory allowance would be far more than adequate. Frankly, I doubt I would find such a machine (PC or server) available where I currently am though.

Cheers and thanks again!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 3857 views
  • 1 like
  • 3 in conversation