Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8348566

OpenJDK is not respecting cgroupv2

XMLWordPrintable

    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      Linux with kernel 6.12
      We have tried different distributions and all have this issue
      The main we use: Red_Hat-21.0.5.0.11-1 build 21.0.5+11-LTS,

      A DESCRIPTION OF THE PROBLEM :
      In kernel 6.12 some cgroups controllers are removed from v1 and moved to v2.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run OpenJDK distribution on Linux with kernel 6.12 without setting MaxRam jvm option, but setting container memory limit (docker, k8s).
      2. Check the size of the JVM heap - it will be not equal to the limit, but will be equal to the MaxRamPercentage * the whole system memory.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      OpenJDK should be compliant with cgroup v2 and retrieve them from cgrops.controller. When launching the JVM with limit set or process, max heap size should be MaxRamPercentage * memory limit.
      ACTUAL -
      JVM heap size is MaxRamPercentage * the whole system memory

      CUSTOMER SUBMITTED WORKAROUND :
      It can be covered by manually setting MaxRam option. But this do not work in all cases as sometimes JVM options can not be changed (some docker images).

      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: