Clean up memory usage of SAS base

Reply
Regular Contributor
Posts: 186

Clean up memory usage of SAS base

[ Edited ]

Hello all,

 

 

After I runed too many SAS process and lots of memory was used by SAS, SAS performence will be reduced. May I ask how to manually(or automatically) delete/clean old memory occupied by SAS to increase performence of the rest/current SAS job? (PC SAS)

 

Thanks!

Grand Advisor
Posts: 10,236

Re: Clean up memory usage of SAS base

Are you getting messages from the system about memory? If so share the messages.

 

Otherwise please describe what you are doing and exactly how "performance will be reduced".

 

You may also have to share some details of your current system options. Can you show the results of this code:

proc options group=memory;
run;
Respected Advisor
Posts: 4,997

Re: Clean up memory usage of SAS base

Sometimes when posters mention memory, they are really running into something else.  For example, perhaps many temporary SAS data sets have been filling the WORK area.  Additional processing may write to the WORK area, but has to use disk space that is more fragmented, and thus takes longer to utilize. 

 

If that's actually your situation ... and ... if you can afford to get rid of all the temporary data sets in the WORK area ... here's an easy program to accomplish that:

 

proc delete data=work._all_;

run;

Regular Contributor
Posts: 186

Re: Clean up memory usage of SAS base


The temporary folder not equal to memory. SAS may use much more memory than work folder. other than clean work folder I have to clean something else.

I give you an example how to make it happen:

you double click to open and browsing some very large sas dataset (not only in work folder). repeat this for a while, your will be same as my situation.

Thanks
Grand Advisor
Posts: 10,236

Re: Clean up memory usage of SAS base

If you are opening data sets in viewtable or similar and leaving them open then there will be significang memory use as one of the features of Viewtable is that you can EDIT the contents. Which means things have to be kept in memory until viewtable is closed and the result written to disk.

 

But the question may be 'why' are you opening multiple large data sets?

Create subsets if you are looking for specific types of records. I don't manually scroll through any dataset with maybe more than 1000 records (and very seldom that many) as it is generally an inefficient process and often means that I don't quite know why I am actually looking for in the raw data.

Regular Contributor
Posts: 186

Re: Clean up memory usage of SAS base

[ Edited ]

I am often double click table with billions of rows
and thousand columns and try quick browsing from top to end.this must a bad habit.I will try to change it.but any solution can manually release the  memory occupied by my SAS? ---------delete some temporary files??

Thanks

Grand Advisor
Posts: 10,236

Re: Clean up memory usage of SAS base

Close the view.

When SAS needs the memory it should release it from the cache.

Regular Contributor
Posts: 186

Re: Clean up memory usage of SAS base

Thank you Ballardw,
Would you please tell me where I can find the physical location of the SAS cache file?

Thanks!
Esteemed Advisor
Posts: 5,199

Re: Clean up memory usage of SAS base

The cache is handled by SAS. What we are trying to say is that you shouldn't concern yourself on SAS memory management other than setting the global options (which will display by the proc options given earlier by @ballardw).
Data never sleeps
Ask a Question
Discussion stats
  • 8 replies
  • 111 views
  • 0 likes
  • 4 in conversation