I have a DELL XPS 15 with 16gb of RAM and I would like to maximize the performance of SAS.
I have changed the MEMSIZE in the config file to 12 gb and SORTSIZE to 6GB. Would this be optimal? What other options should I change? How about REALMEMSIZE
By the way, is there a way to change MEMSIZE by running some code?
As far as I know, Memsize allocation is a configuration/initialization option and not post-startup option.
Therefore I don't think you can run code to change the memsize value. But I could stand corrected if otherwise,
Ahmed
MEMSIZE and SORTSIZE are totally different, and should not have the same value.
See the schema here.
Here are
- Paper related to Configuration and Tuning Guidelines for SAS ® 9 in Microsoft Windows Server 2008, that may give you some ideas
- SAS Tech Support Usage Note illustrating SAS® system option settings for best performance in UNIX and Windows environments
Ahmed
Increasing your MEMSIZE and SORTSIZE settings to much higher values is unlikely to improve performance much. It will certainly improve performance if you have set them too small but in my experience SAS only uses the memory and sort size it requires for any particular job.
Tuning your SAS code is likely to have a much better payoff with regards to performance, the downside being the extra work required.
>Would this be optimal? What other options should I change?
You need to use options fullstimer and look at the log, to see where the bottlenecks in your process are.
Are your table sorts all internal sorts (in memory only)?
Is you CPU waiting for the disks to give it data?
Or is the CPU the bottleneck?
When you know where the bottleneck is, you start looking for solutions.
it is not really a bottleneck as it still ran with the default setting. However it was quite slow compared to after increasing the MEMSIZE and SORTSIZE. My dataset is quite large (>50gb) and sometimes I need to run regressions with fixed effects and double clustering. My experience is increasing the MEMSIZE helps my code to run a bit faster
For regressions on that kind of volume, you could try having REALMEMSIZE close to the total amount of available RAM, maybe around 14 GB depending on what else is running.
Option MEMSIZE should be larger still, since it includes the paging space.
Note that option SUMSIZE only affects procedures MEANS, OLAP, REPORT, SUMMARY, SURVEYFREQ, SURVEYLOGISTIC, SURVEYMEANS, and TABULATE, so not regressions.
To see how much RAM is available for SAS to use at any point in time, you can run
%put Free RAM = %sysfunc(putn(%sysfunc(getoption(xmrlmem))/1024**2,comma10.))MB;
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.
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.