-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
-
-
The best practice in modern OpenJDK for setting a JVM max heap size is to use -XX:MaxRAMPercentage. The containers for (historical reasons) instead attempt to determine the available memory (container limit via cgroup v1 falling back to physical memory, no cgroup v2 support) and then set a fixed heap limit with JVM flag -Xmx.
The JVM is container aware. We should stop interpreting cgroups v1 in the run script and instead let the JVM set heap limit according to -XX:MaxRAMPercentage which should also respond to runtime limit adjustments.