Hello everyone!
Does anybody face a problem with SAS EG eating up almost all available RAM?
I'm not sure that it is a bug, so I haven't posted something about it to support.
The situation I have is usually as follows:
I'm starting EG, after a few hours of coding I'm discovering the slow motion on my machine, then I'm starting task manager (Win Server 2003 x64) and observing that EG ate 1.5 Gb of RAM.
As I have a slightest idea about the nature of this memory consumption, I have no opportunity to limit or prevent it.
For example, will it be helpful if I unembed all code in the project?
Any experience will be helpfull!
Best regards
One possibility is that some results can be very large, particularly in html and pdf formats. You could change your settings to open your results outside of EG, and see if this helps.
Tom
If you see the memory climbing when working with the programming editor, check the guidance in this paper:
http://support.sas.com/documentation/onlinedoc/guide/blog/WPF_SASEG43.pdf
Chris
Well, I failed to change the WPF tier to something from 0x0, but alas.
However, I still think that that problem is more about EG resource management and garbage cleaning, and not about rendering.
Any other ideas would be usefull.
Thanks anyway!
TomKari
Well this might've been a problem in case there were pdf and html output. However, there's none.
Chris@SAS
Well the only hint I found was about WPF (which uses software rendering on my server). I'm accessing EG through RDP client, so I'm not sure (beeing not a specialist in WPF) how this affects the ability of hardware rendering. But I'll try to figure it out and at least update video adapter driver.
One EG option that I suspect impacts memory usage is whether you have the project log switched on or not. Since I find it highly useful I leave it switched on but memory tends to climb over time.
While I use EG primarily to code SAS programs it is worth remembering that every time you run a program this is added to the process flow. If your programs create lots of SAS datasets these get added to your process flow also. Cleaning out your process flow from time to time will reduce your memory usage, but only do this if you program in EG by writing code and only use program files for project development.
I use EG 5.1 64-bit and find that over a day EG can easily consume up to 1 GB of memory.
Because SAS Enterprise Guide is a .NET application, there are nuances to how memory is managed. You can't really tell too much about how efficient the application is simply by looking at the Working Set value.
The .NET runtime is generous with initial memory allocations, if there are available resources. Over time, you might see memory use climb if you look at the Working Set number in Task Manager. But when resources get tighter on the system, you should see that number go back down.
For example, suppose that you start EG and open a large report. When the report is opened and rendered, you'll probably see memory use increase. When you close the report view, the application will free the memory, but you might not see the working set number decrease right away. That doesn't indicate a problem. It's only a problem if, over time as you use the application, memory use climbs and climbs and never goes down, even if your activity remains level.
One trick that sometimes works to show this: minimize the application and then restore it. You might see the working set go down. That's kind of like "jiggling the handle", but it doesn't really indicate a leak. It's just triggering Windows and the .NET runtime to clean up, which would have happened sooner or later.
The problem is the memory climbs and climbs in average.
I usually restart EG after it consume 1.5-1.7 Gb, because it's nearly impossible to work with it: everything drastically slows down.
But I have feeling that if I don't quit it, EG will eat up to 2 Gb and further...
SASKiwi wrote:
One EG option that I suspect impacts memory usage is whether you have the project log switched on or not. Since I find it highly useful I leave it switched on but memory tends to climb over time.
While I use EG primarily to code SAS programs it is worth remembering that every time you run a program this is added to the process flow. If your programs create lots of SAS datasets these get added to your process flow also. Cleaning out your process flow from time to time will reduce your memory usage, but only do this if you program in EG by writing code and only use program files for project development.
I use EG 5.1 64-bit and find that over a day EG can easily consume up to 1 GB of memory.
Well, I do use EG ONLY to code SAS programs (never use built-in tasks) and my process flows usually consist of program files, datasets and results(from graphics or report functions). But what do you mean of 'cleaning out your process flow from time to time' ?
Let's assume I have a several step tree process: each step generate 2 datasets which then used by seperate program file to produce next two datasets and etc.
Given this datasets are all necessary to be saved in library, how do I clean the process flow?
p.s. Your comment on this problem is very close to what I have.
Probably you can try this for deleting the temprary workspace on a regular interval,
proc datasets lib=work kill nolist;
run;
Lets see if it fress some of your workspace memmory.
Is it about RAM?
Okay, I'll try next time.
By the way, do you know any method to clear unnecessary TMP files like old results/plots? Which are not in WORK directory.
I mean some results generated by EG in case of running some graphical procedures (like GMAP or SGPLOT).
To clean out the process flow I just go to the Project Tree - Process Flow - Programs and delete those I am no longer working on. You will be prompted to save program files if they are not already saved. I find that the program tasks taking up the most memory are those producing lots of datasets as each of these becomes a process flow object as well. Deleting the program removes all process objects associated with it as well including dataset definitions, but obviously not the actual datasets on disk.
MMMmm... I see. Since I use EG to hardcode report production and calculation - there is no garbage in process flows.
But thanks, anyway.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.