Skip to content

Commit f7326ef

Browse files
committed
Modified understanding how to override JVM max heap size section
1 parent 9b9008a commit f7326ef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/nodes-cluster-resource-configure-jdk.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ this documentation, and may involve setting multiple additional JVM options.
2929
== Understanding how to override the JVM maximum heap size
3030

3131
For many Java workloads, the JVM heap is the largest single consumer of memory.
32-
Currently, the OpenJDK defaults to allowing up to 1/4 (1/`-XX:MaxRAMFraction`)
32+
Currently, the OpenJDK defaults to allowing up to 1/4 (1/`-XX:MaxRamPercentage`)
3333
of the compute node's memory to be used for the heap, regardless of whether the
3434
OpenJDK is running in a container or not. It is therefore *essential* to
3535
override this behavior, especially if a container memory limit is also set.
3636

3737
There are at least two ways the above can be achieved:
3838

39-
* If the container memory limit is set and the experimental options are
40-
supported by the JVM, set `-XX:+UnlockExperimentalVMOptions
41-
-XX:+UseCGroupMemoryLimitForHeap`.
39+
* If the container memory limit is set and the default options are
40+
supported by the JVM, set `-XX:
41+
-XX:+UseContainerSupport`.
4242
+
4343
[NOTE]
4444
====

0 commit comments

Comments
 (0)