Uploaded image for project: 'OpenJDK'
  1. OpenJDK
  2. OPENJDK-1486

[rhel-8] replace use of JVM flag -Xmx with -XX:MaxRAMPercentage

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • 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.

              jdowland@redhat.com Jonathan Dowland
              jdowland@redhat.com Jonathan Dowland
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: