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:
Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: tkrproxy64.exe (6600) consumed 107340787712 bytes
This is the process that SAS creates to manage the R interface. That's around 100GB of memory!
Obviously the R interface isn't configured to respect MEMSIZE, which is understandable. How can I limit the memory it's allowed? 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?
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).
Surely you should look at R's own memory settings? SAS has no control over what memory other software uses.
Based on this documentation it sounds like SAS doesn't pass options to R when it starts it but you can set environment variables:
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.
Source: https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_r_sect004.htm?
So perhaps you can use R_MAX_MEM_SIZE to limit memory consumption from R?
https://www.rdocumentation.org/packages/utils/versions/3.6.2/topics/memory.size
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!
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.