-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: openjdk8u472, 26
-
Component/s: hotspot
-
master
-
generic
-
linux
Kubernetes and other container runtimes changed the mapping function from --cpu-shares values to cgroups v2 cpu.weight value. Originally the function was (y=cpu.weight, x=cpu-shares):
y = (1 + ((x - 2) * 9999) / 262142)
This changed to:
y=10^(log2(x)^2/612 + 125/612 * log2(x) - 7.0/34.0)
See also:
https://github.com/containers/crun/issues/1721
https://github.com/containers/crun/commit/4998c928494c563f8d06494a1f2ed3443de29c2b
We need to adjust the container detection code to this new function.
y = (1 + ((x - 2) * 9999) / 262142)
This changed to:
y=10^(log2(x)^2/612 + 125/612 * log2(x) - 7.0/34.0)
See also:
https://github.com/containers/crun/issues/1721
https://github.com/containers/crun/commit/4998c928494c563f8d06494a1f2ed3443de29c2b
We need to adjust the container detection code to this new function.
- duplicates
-
JDK-8371392 TestDockerCpuMetrics.java fails on some machines
-
- Closed
-
- links to
-
Commit(master)
openjdk/jdk/5d65c23c
-
Review(master)
openjdk/jdk/28157