-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
openjdk8u472, 26
-
Cause Known
-
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 + 125 * log2(x)) / 612.0 - 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 + 125 * log2(x)) / 612.0 - 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.