@anacv wrote:
I have a question: Is there an easy way to increase the Java memory limit defined in loadeR.java (currently 2GB)?
After some research, I managed to do it by calling jinit between the require of rJava and loadeR, but I’m not sure if there is a more direct way within loadeR:
.jinit(classpath = "netcdfAll-4.6.0-SNAPSHOT.jar", parameters = options(java.parameters = "-Xmx6g"))
Thanks!
@jbedia wrote:
For a specific session, you can do it through R's global options:
options(java.parameters = "-Xmx8g") # Allows up to 8GB of heap memory
The -Xms option would set a minimum allocation, though that’s usually not necessary.
If you request more memory than your system can provide, I believe Java will simply ignore it.
@anacv
Hi, thanks for the responses! I see that both options work.
Is this documented anywhere?
Now it is 🙂
Now it is 🙂