Skip to content

Commit 0c308bb

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

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ 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
====
45-
The `UseCGroupMemoryLimitForHeap` option has been removed in JDK 11. Use `-XX:+UseContainerSupport` instead.
45+
The `UseCGroupMemoryLimitForHeap` option has been removed in JDK 11. The `-XX:+UseContainerSupport` option is enabled by default.
4646
====
4747
+
4848
This sets `-XX:MaxRAM` to the container memory limit, and the maximum heap size

0 commit comments

Comments
 (0)