I am working on memory-intensive operations in R. I have seen some advice on this site about increasing the memory limit using R_MAX_VSIZE
but I haven’t found a clear explanation of exactly what sorts of values can be inputted and how they are read.
What formats are accepted/valid for the R_MAX_VSIZE
environment variable?
Here is what I have found so far:
-
R base documentation – Memory: Memory Available for Data Storage
The maximal vector heap size can be set with the environment variable
R_MAX_VSIZE
I can’t find additional information about what values are allowed on this help page.
-
Graeme Frost’s answer to R on MacOS Error: vector memory exhausted (limit reached?)
This answer suggests setting the value to “100Gb”. When I encountered the issue on my machine, this actually fixed my problem, but there are other answers that indicate other values are valid.
-
Connor Dibble’s answer to Error: vector memory exhausted (limit reached?) R 3.5.0 macOS
This answer includes settings the value like
export R_MAX_VSIZE=32000000000
which doesn’t include the units, so I assume it is being interpreted as bytes.