<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RAM usages // MEMSIZE SORTSIZE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438860#M109459</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I have a PC with 32GB ram.&lt;/P&gt;
&lt;P&gt;I wonder if the setting I got below maximize the use of Ram yet?&lt;/P&gt;
&lt;P&gt;If not, how can I change the setting?&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Group=MEMORY&lt;/P&gt;
&lt;P&gt;&amp;nbsp;SORTSIZE=268435456&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Size parameter for sort&lt;/P&gt;
&lt;P&gt;&amp;nbsp;SUMSIZE=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Upper limit for data-dependent memory usage during summarization&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MAXMEMQUERY=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Maximum amount of memory returned when inquiring as to available space&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MEMBLKSZ=16777216 Size of memory blocks allocated to support MEMLIB and MEMCACHE options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MEMMAXSZ=2147483648&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Maximum amount of memory allocated to support MEMLIB and MEMCACHE options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;LOADMEMSIZE=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Suggested memory limit for loaded SAS executables&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MEMSIZE=2147483648&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies the limit on the total amount of memory to be used by the SAS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System&lt;/P&gt;
&lt;P&gt;&amp;nbsp;REALMEMSIZE=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Limit on the total amount of real memory to be used by the SAS System&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2018 03:04:01 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2018-02-22T03:04:01Z</dc:date>
    <item>
      <title>RAM usages // MEMSIZE SORTSIZE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438860#M109459</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I have a PC with 32GB ram.&lt;/P&gt;
&lt;P&gt;I wonder if the setting I got below maximize the use of Ram yet?&lt;/P&gt;
&lt;P&gt;If not, how can I change the setting?&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Group=MEMORY&lt;/P&gt;
&lt;P&gt;&amp;nbsp;SORTSIZE=268435456&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Size parameter for sort&lt;/P&gt;
&lt;P&gt;&amp;nbsp;SUMSIZE=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Upper limit for data-dependent memory usage during summarization&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MAXMEMQUERY=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Maximum amount of memory returned when inquiring as to available space&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MEMBLKSZ=16777216 Size of memory blocks allocated to support MEMLIB and MEMCACHE options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MEMMAXSZ=2147483648&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Maximum amount of memory allocated to support MEMLIB and MEMCACHE options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;LOADMEMSIZE=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Suggested memory limit for loaded SAS executables&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MEMSIZE=2147483648&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies the limit on the total amount of memory to be used by the SAS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System&lt;/P&gt;
&lt;P&gt;&amp;nbsp;REALMEMSIZE=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Limit on the total amount of real memory to be used by the SAS System&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 03:04:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438860#M109459</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2018-02-22T03:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438875#M109460</link>
      <description>No you are not.&lt;BR /&gt;Increase MEMSIZE and SORTSIZE options.</description>
      <pubDate>Wed, 21 Feb 2018 07:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438875#M109460</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-02-21T07:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438881#M109462</link>
      <description>&lt;P&gt;Usually you should only increase the MEMSIZE / SORTSIZE options' values from the default if your SAS jobs are running out of memory for processing or sorting. Increasing these won't necessarily reduce job run times.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 08:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438881#M109462</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-02-21T08:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438973#M109493</link>
      <description>&lt;P&gt;So I see 1 way to change MEMSIZE is:&amp;nbsp;&lt;SPAN&gt;Start -&amp;gt; Run -&amp;gt; sas.exe -memsize 30G&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also the OPTIONS way but I try this one and it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc options memsize=3047483648;&lt;BR /&gt;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How can I fix that proc?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;HHCFX&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 16:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/438973#M109493</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2018-02-21T16:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439097#M109526</link>
      <description>&lt;P&gt;To make things easier, you may want to consider having your own custom SAS config file.&amp;nbsp; That way you can tweak settings quickly, especially for testing (edit the file and restart SAS to pick up any changes).&amp;nbsp; My main SAS workstation has an i7-6700 processor, 32GB RAM, and a 512GB SSD (SanDisk X400) and I've been pretty happy with it for development work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My SAS desktop shortcut is:&lt;/P&gt;
&lt;P&gt;"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\users\dave\sas94.cfg"&lt;/P&gt;
&lt;P&gt;In the sas94.cfg file I include the default shipping UTF-8 config followed by my custom settings:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/*
 * sas94.cfg
 *
 * This config file sets up the SAS environment for Dave - UTF8.
 *
 */

/* Include default SAS config file */

-config "C:\Program Files\SASHome\SASFoundation\9.4\nls\u8\sasv9.cfg"

/* Update Autocall macro path */

-insert sasautos "C:\src\macros"

/* Autoexec location */

-autoexec "C:\src\autoexec_win.sas"

/* Memlib Memory options */

-MEMLIB
-MEMCACHE 4
-MEMMAXSZ 32G 
-MEMSIZE MAX
-SORTSIZE 1G

/* General options */

-FONT 'Consolas' 10
-awstitle "SAS 9.4M5 UTF-8"
-noenhancededitor 
-nodmsexp
-nofmterr 
-comamid tcp 
-noxwait
-pagesize max 
-dmslogsize max
-dmsoutsize max
-errors 10
-altlog "C:\temp\altutf.log"
-work "C:\Temp\sastemp"

/* File I/O */

-BUFNO 200
-BUFSIZE 64K
-UBUFSIZE 64K
-UBUFNO 20
-IBUFNO 64
-IBUFSIZE MAX
-CBUFNO MAX
-tbufsize 512k
-catcache max
-compress yes

/* Oracle options */
-DBIDIRECTEXEC
-sql_ip_trace note

/* Email options */

-EMAILSYS SMTP 
-EMAILHOST mail.yourhost.com 

/* Stats and messages */

-STIMER
-FULLSTIMER
-MSGLEVEL I
-mautolocdisplay 
-source2 
-oplist
-nosplash

&lt;/PRE&gt;
&lt;P&gt;I set the memory sizes to the max, and also turn on &lt;A title="MEMLIB doc" href="http://go.documentation.sas.com/?docsetId=hostwin&amp;amp;docsetTarget=n06sv2f5uly1cin1k2qp1k1rd114.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;MEMLIB &lt;/A&gt;and &lt;A title="MEMCACHE doc" href="http://go.documentation.sas.com/?docsetId=hostwin&amp;amp;docsetTarget=p1mkxy65cf1wern1wlb56ita3a4p.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;MEMCACHE &lt;/A&gt;which utilizes RAM for work files and caching.&amp;nbsp; Depending on your file sizes, you may or may not be able to fit everything in memory and may have to turn those options off.&amp;nbsp; The rest of the options are not directly related to your question so I thought I'd leave them in there for completeness and discussion &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; I actually have several config files in case I need to run with other encodings (ie Latin1) or without the memlib/memcache, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439097#M109526</guid>
      <dc:creator>DaveHorne</dc:creator>
      <dc:date>2018-02-21T21:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439158#M109549</link>
      <description>&lt;P&gt;So I run this proc to find the config file.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc options option=config;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Mine is i7 3770 32G 512G SSD.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I play around with&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;-MEMCACHE 4
-MEMMAXSZ 32G 
-MEMSIZE MAX
-SORTSIZE 1G&lt;/PRE&gt;
&lt;P&gt;Clearly, making MEMSIZE MAX and MEMMAXSZ 32G&lt;/P&gt;
&lt;P&gt;make huge improvement in data step. In this step, I simply make a big file from my existing file. It cut time form:&lt;/P&gt;
&lt;P&gt;CPU from 19.53 to 16.66&lt;/P&gt;
&lt;P&gt;Real time from&lt;STRONG&gt; 31.11 to 17.84&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &amp;nbsp;I am not sure why real time reduce a lot while CPU reduce not as much&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SORTSIZE benefit is not clear. Leaving at the 256MB or change to 0.5G or 1G doesn't impact datastep or Proc sort much.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;I wonder why setting it to 1G doesn't help at all?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-MEMCACHE 4&lt;/PRE&gt;
&lt;P&gt;Turns out to be disaster, in the "Windows Task Manager", I saw the Ram usage rocket to 30 G and stay flat there for really long time.&lt;/P&gt;
&lt;P&gt;Data step take longer time. (with out that MEMCACHE, ram usage max about 28G).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you so much.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;7 data combine_file; set Ret_buy_fix_tp_notrail_h4 Ret_buy_fix_tp_notrail_h4&lt;BR /&gt;7 ! Ret_buy_fix_tp_notrail_h4; run;&lt;/P&gt;
&lt;P&gt;NOTE: There were 549101 observations read from the data set WORK.RET_BUY_FIX_TP_NOTRAIL_H4.&lt;BR /&gt;NOTE: There were 549101 observations read from the data set WORK.RET_BUY_FIX_TP_NOTRAIL_H4.&lt;BR /&gt;NOTE: There were 549101 observations read from the data set WORK.RET_BUY_FIX_TP_NOTRAIL_H4.&lt;BR /&gt;NOTE: The data set WORK.COMBINE_FILE has 1647303 observations and 568 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt; real time 17.84 seconds&lt;BR /&gt; cpu time 16.66 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;8&lt;BR /&gt;9&lt;BR /&gt;10 proc sort data=combine_file ; by decending rate Q_date tradetime;run;&lt;/P&gt;
&lt;P&gt;NOTE: There were 1647303 observations read from the data set WORK.COMBINE_FILE.&lt;BR /&gt;NOTE: The data set WORK.COMBINE_FILE has 1647303 observations and 568 variables.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt; real time 38.22 seconds&lt;BR /&gt; cpu time 32.27 seconds&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 03:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439158#M109549</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2018-02-22T03:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439161#M109550</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/49486"&gt;@hhchenfx&lt;/a&gt; did you also introduce the File I/O options &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/100"&gt;@DaveHorne&lt;/a&gt; had in his configuration?&lt;/P&gt;
&lt;P&gt;For simple datasteps if you are not hitting errors mentioning being out of memory that just adjusting the memory limit by itself would not affect the runtime.&lt;/P&gt;
&lt;P&gt;Its more likely your improved datastep run times came from improved I/O tuning rather than increasing the memory limit.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 03:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439161#M109550</guid>
      <dc:creator>SimonDawson</dc:creator>
      <dc:date>2018-02-22T03:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439163#M109552</link>
      <description>&lt;P&gt;All I did is to change these 4 things.&lt;/P&gt;
&lt;P&gt;I didn't touch the I/O at all.&lt;/P&gt;
&lt;P&gt;My SAS is running now so I will try the I/O later.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 04:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439163#M109552</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2018-02-22T04:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages // MEMSIZE SORTSIZE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439209#M109572</link>
      <description>&lt;P&gt;You seem to be confusing MEMSIZE and REALMEMSIZE.&lt;/P&gt;
&lt;P&gt;REALMEMSIZE should always be less than RAM (you can let SAS decide, but it can better to set it yourself).&lt;/P&gt;
&lt;P&gt;MEMSIZE can be more as it includes paging space.&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://communities.sas.com/t5/General-SAS-Programming/What-s-the-meaning-of-value-MIN-and-MAX-of-SORTSIZE-system/m-p/371526#M47450" target="_self"&gt;here&lt;/A&gt; for a diagram.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 11:01:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439209#M109572</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-02-22T11:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439280#M109604</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/49486"&gt;@hhchenfx&lt;/a&gt;&amp;nbsp;seeing the log and that the data set has 568 variables, that's probably the biggest impact on your performance in this particular case (especially in the sort step).&amp;nbsp; If you don't need all those variables in your analysis, then keeping (or dropping) variables in the data step can help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you do need to keep all the variables, what are their total length (observation length)?&amp;nbsp; You can get the observation length from proc contents and bump the bufsize value (in my config I have the bufsize at 64K but you could definitely go higher so that you can fit more observations into a page of memory).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you have a fast processor, try turning on the compress option as well.&amp;nbsp; That may not speed up processing a great deal but it should save space for data sets stored on disk (and save I/O reading them).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Closing the time difference between CPU and real time is the goal; keep the cpu busier than the disk drive (I/O).&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 14:26:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439280#M109604</guid>
      <dc:creator>DaveHorne</dc:creator>
      <dc:date>2018-02-22T14:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439335#M109618</link>
      <description>&lt;P&gt;Thank you for your suggestion.&lt;/P&gt;
&lt;P&gt;It is the first time I look into this matter!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the content of my data I normally work with.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what do you think the right Bufsize for me. By the way, what is the cost of bumping Bufsize too hight?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHCFX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Contents: Attributes" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Data Set Name&lt;/TH&gt;
&lt;TD class="l data"&gt;INDI2018.RET_BUY_FIX_TP_NOTRAIL_H4&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Observations&lt;/TH&gt;
&lt;TD class="l data"&gt;549101&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Member Type&lt;/TH&gt;
&lt;TD class="l data"&gt;DATA&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Variables&lt;/TH&gt;
&lt;TD class="l data"&gt;568&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Engine&lt;/TH&gt;
&lt;TD class="l data"&gt;V9&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Indexes&lt;/TH&gt;
&lt;TD class="l data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Created&lt;/TH&gt;
&lt;TD class="l data"&gt;Monday, February 05, 2018 02:53:54 AM&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;&lt;FONT color="#FF0000"&gt;Observation Length&lt;/FONT&gt;&lt;/TH&gt;
&lt;TD class="l data"&gt;&lt;FONT color="#FF0000"&gt;4544&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Last Modified&lt;/TH&gt;
&lt;TD class="l data"&gt;Monday, February 05, 2018 02:53:54 AM&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Deleted Observations&lt;/TH&gt;
&lt;TD class="l data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Protection&lt;/TH&gt;
&lt;TD class="l data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Compressed&lt;/TH&gt;
&lt;TD class="l data"&gt;NO&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Contents: Engine/Host Information" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;Engine/Host Dependent Information&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;&lt;FONT color="#FF0000"&gt;Data Set Page Size&lt;/FONT&gt;&lt;/TH&gt;
&lt;TD class="l data"&gt;&lt;FONT color="#FF0000"&gt;16384&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;&lt;FONT color="#FF0000"&gt;Number of Data Set Pages&lt;/FONT&gt;&lt;/TH&gt;
&lt;TD class="l data"&gt;&lt;FONT color="#FF0000"&gt;183038&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;First Data Page&lt;/TH&gt;
&lt;TD class="l data"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Max Obs per Page&lt;/TH&gt;
&lt;TD class="l data"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Obs in First Data Page&lt;/TH&gt;
&lt;TD class="l data"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Feb 2018 15:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439335#M109618</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2018-02-22T15:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439435#M109656</link>
      <description>&lt;P&gt;Regarding bufsize, here is a link that might interest you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Using-bufsize-and-bufno/m-p/401170#M97302" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Using-bufsize-and-bufno/m-p/401170#M97302&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding compressing such wide tables,I recommend you try the SPDE engine with binary compression. You'll probably reduce the table size to a few percent points of the uncompressed size (i.e. &amp;gt; 90% compression ratio).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 20:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/439435#M109656</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-02-22T20:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463200#M117966</link>
      <description>&lt;P&gt;Is there a way to have SAS recognize an increased MEMSIZE for the 32bit version of SAS? I have plenty of RAM and have set up the config file the way you suggested and that's the only thing that is defaulting backwards (it will let me have 4GB of RAM).&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 02:19:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463200#M117966</guid>
      <dc:creator>drb4511</dc:creator>
      <dc:date>2018-05-18T02:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463203#M117967</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/100"&gt;@DaveHorne&lt;/a&gt;&amp;nbsp;Do you actually use MEMCACHE Dave? I find it very inconvenient to use.&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 02:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463203#M117967</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-18T02:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463204#M117968</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/2847"&gt;@drb4511&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;2^32 = 4,294,967,296 = 4 GB.&lt;BR /&gt;That's a limitation of the architecture, and one reason the world has moved to 64 bits.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 03:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463204#M117968</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-18T03:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463307#M118023</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;, yes, I use it quite a lot.&amp;nbsp; I run over a thousand jobs a day scheduled on Windows servers and at least 95% of them use the MEMLIB/MEMCACHE options (enabled in our "default" config).&amp;nbsp; Being able to run in-memory saves a lot of I/O processing.&amp;nbsp; I even tested it with pointing WORK to a RAMDISK and the MEMLIB option was still faster (I imagine it's been optimized for that).&amp;nbsp; A few of our jobs use upwards of 96-128GB of RAM.&amp;nbsp; Most fit inside of 48GB or less.&amp;nbsp; It's all scripted so it's fairly easy to turn on/off as needed (I point to a different config without the memory options in those few cases).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do have MEMLIB/MEMCACHE turned on in the default config on my workstation (it's 32GB RAM, i7-6700, 500GB SSD storage, running SAS 9.4M5, Windows10).&amp;nbsp; I tend to do smaller unit testing on the workstation and run the "big" jobs on the servers.&amp;nbsp; I don't think the MEMLIB options are a huge benefit on my PC, especially with a fast processor and SSD storage (but I like pushing it to the limit if I can :).&amp;nbsp; Let me know if you'd like more details.&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 12:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463307#M118023</guid>
      <dc:creator>DaveHorne</dc:creator>
      <dc:date>2018-05-18T12:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463376#M118051</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 15:42:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463376#M118051</guid>
      <dc:creator>drb4511</dc:creator>
      <dc:date>2018-05-18T15:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463483#M118083</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/100"&gt;@DaveHorne&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder why you use&amp;nbsp;&lt;SPAN&gt;MEMLIB/MEMCACHE as if they were a conjoined pair. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here is I how I see&lt;/SPAN&gt;&amp;nbsp;the SAS in-memory data options:&lt;/P&gt;
&lt;P&gt;- I often use SASFILE for read-only data as it doesn't&amp;nbsp;require&amp;nbsp;changing tables names or defining a new library&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;MEMLIB is less used; it is useful for dynamic data or&amp;nbsp;for creating/processing temporary tables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- MEMCACHE is less&amp;nbsp;useful, and I avoid it&amp;nbsp;because if one is not vigilant,&amp;nbsp;MEMCACHE can lock&amp;nbsp;RAM space until the SAS session&amp;nbsp;is teminated.&lt;/P&gt;
&lt;P&gt;Do you have a different experience with MEMCACHE?&lt;/P&gt;
&lt;P&gt;MEMLIB speeds are typically&amp;nbsp;several times faster than SSD, but the &lt;SPAN&gt;newfangled M2 drives&amp;nbsp;may just make MEMLIB redundant. I haven't tested this yet. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe should this discussion not be polluting this thread.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 May 2018 04:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/463483#M118083</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-19T04:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/464102#M118324</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;, I didn't mean to imply they were a conjoined pair, I tend to use them both to maximize memory usage (i.e. on servers where we have a large amount of RAM).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With jobs that have really large data sets or work files we do sprinkle proc deletes in the code to free up RAM as the job runs. And sometimes we skip the in-memory options for large data over 200GB. (I've had some success with SGIO and multi-gigabyte data sets)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with you, the latest M.2 SSD's are very promising and I can wait to get my hands on one to try out! Definitely would love to hear your experience if you get one to test with.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Dave&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 15:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/464102#M118324</guid>
      <dc:creator>DaveHorne</dc:creator>
      <dc:date>2018-05-22T15:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: RAM usages</title>
      <link>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/464212#M118344</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/100"&gt;@DaveHorne&lt;/a&gt;&amp;nbsp;I'll let you know if can free the time to try M.2 drives, and please do likewise. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes SGIO is definitely an option to be considered for speeding up sequential access on large data sets.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Using-bufsize-and-bufno/m-p/400893/highlight/true#M97187" target="_self"&gt;Here&lt;/A&gt; is a benchmark in case you are interested in hard(ish) figures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 21:45:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/RAM-usages-MEMSIZE-SORTSIZE/m-p/464212#M118344</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-05-22T21:45:14Z</dc:date>
    </item>
  </channel>
</rss>

