Hi,
When I running some SCM plugin on Jenkins (debug Jenkins instance which started with JDK8.212 OpenJ9), like subversion.
I always get "out of memory" issue when the Jenkins job almost is done, dumped when killing the process. Error below:
FATAL: Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.lang.String.
at java.lang.String.substring(String.java:2661)
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:158)
at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:127)
at hudson.util.ProcessTree$WindowsOSProcess.getEnvironmentVariables2(ProcessTree.java:475)
at hudson.util.ProcessTree$WindowsOSProcess.hasMatchingEnvVars2(ProcessTree.java:487)
at hudson.util.ProcessTree$WindowsOSProcess.access$300(ProcessTree.java:410)
at hudson.util.ProcessTree$Windows.hasMatchingEnvVars(ProcessTree.java:561)
at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:536)
at hudson.Launcher$LocalLauncher.kill(Launcher.java:949)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:502)
at hudson.model.Run.execute(Run.java:1737)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
Finished: FAILURE
I found the OpenJ9 default Xms is 8m and Xmx is 512m.
After manually change to -Xms128m and -Xmx4096m, the issue is gone.
Is this the openJ9 limitation or issues?
Is this the openJ9 limitation or issues?
In Java 8, the heap size defaults to the smaller sizes as you've seen. This is mostly for historical reasons.
In later releases, OpenJ9 will use a 1/4 of the available memory for the heap.
fyi @dmitripivkine @charliegracie