-
Bug
-
Resolution: Duplicate
-
P4
-
21.0.5, 25
-
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
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
- duplicates
-
JDK-8349988 Change cgroup version detection logic to not depend on /proc/cgroups
-
- Open
-