<?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 Re: Limit memory available to R (through PROC IML) in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758897#M22735</link>
    <description>&lt;P&gt;Based on this documentation it sounds like SAS doesn't pass options to R when it starts it but you can set environment variables:&lt;BR /&gt;&lt;EM&gt;No startup options are sent to R by the SUBMIT statement. In particular, you cannot set command-line options such as --no-restore or --vanilla. However, you can set some command-line options by using environment variables.&lt;/EM&gt;&lt;BR /&gt;Source: &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_r_sect004.htm" target="_blank" rel="noopener"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_r_sect004.htm&lt;/A&gt;?&lt;BR /&gt;&lt;BR /&gt;So perhaps you can use R_MAX_MEM_SIZE to limit memory consumption from R?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/memory.size" target="_blank" rel="noopener"&gt;https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/memory.size&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Aug 2021 20:59:41 GMT</pubDate>
    <dc:creator>gwootton</dc:creator>
    <dc:date>2021-08-02T20:59:41Z</dc:date>
    <item>
      <title>Limit memory available to R (through PROC IML)</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758869#M22730</link>
      <description>&lt;P&gt;My server went down today, and it looks like it was due to a user running the server out of memory via R, as I see in the notes:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: tkrproxy64.exe (6600) consumed 107340787712 bytes&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is the process that SAS creates to manage the R interface.&amp;nbsp; That's around 100GB of memory!&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously the R interface isn't configured to respect MEMSIZE, which is understandable.&amp;nbsp; How can I limit the memory it's allowed?&amp;nbsp; Can I configure the command SAS uses to start the process (using the --max-mem-size flag) or is there a correct configuration file, either in the R or SAS space, to set this?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume I can't configure SAS to run the R job on another server, and still allow users to use PROC IML to directly submit R jobs (and take advantage of the quick data passing between the two).&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 18:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758869#M22730</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2021-08-02T18:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Limit memory available to R (through PROC IML)</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758889#M22731</link>
      <description>&lt;P&gt;Surely you should look at R's own memory settings? SAS has no control over what memory other software uses.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 20:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758889#M22731</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-08-02T20:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Limit memory available to R (through PROC IML)</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758891#M22732</link>
      <description>Limit the memory consumption of user processes by means of the operating system.&lt;BR /&gt;A well set-up system should never allow a user process to bring it down.</description>
      <pubDate>Mon, 02 Aug 2021 20:40:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758891#M22732</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-08-02T20:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Limit memory available to R (through PROC IML)</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758892#M22733</link>
      <description>It could be set in either place (SAS could set the limit when it spawns the process), but either way I hope to get an answer from someone who administers a SAS server as to how they set that limit whether or not it’s in SAS configuration.</description>
      <pubDate>Mon, 02 Aug 2021 20:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758892#M22733</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2021-08-02T20:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Limit memory available to R (through PROC IML)</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758893#M22734</link>
      <description>Windows actually was okay, but it killed the SAS WebAppServer as that was the second biggest consumer of memory.</description>
      <pubDate>Mon, 02 Aug 2021 20:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758893#M22734</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2021-08-02T20:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Limit memory available to R (through PROC IML)</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758897#M22735</link>
      <description>&lt;P&gt;Based on this documentation it sounds like SAS doesn't pass options to R when it starts it but you can set environment variables:&lt;BR /&gt;&lt;EM&gt;No startup options are sent to R by the SUBMIT statement. In particular, you cannot set command-line options such as --no-restore or --vanilla. However, you can set some command-line options by using environment variables.&lt;/EM&gt;&lt;BR /&gt;Source: &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_r_sect004.htm" target="_blank" rel="noopener"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_r_sect004.htm&lt;/A&gt;?&lt;BR /&gt;&lt;BR /&gt;So perhaps you can use R_MAX_MEM_SIZE to limit memory consumption from R?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/memory.size" target="_blank" rel="noopener"&gt;https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/memory.size&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 20:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758897#M22735</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2021-08-02T20:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Limit memory available to R (through PROC IML)</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758911#M22736</link>
      <description>&lt;P&gt;Ah, that's just what I was hoping for - I looked at some documentation pages that talked about everything else in that _except_ the environment variable, for some reason... will try it out, thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 21:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Limit-memory-available-to-R-through-PROC-IML/m-p/758911#M22736</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2021-08-02T21:40:15Z</dc:date>
    </item>
  </channel>
</rss>

