-
Task
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
False
-
None
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
-
This is the same as THREESCALE-10167 but it's only for apisonator.
One outcome of the investigation of THREESCALE-10003 was that OpenShift moved to cgroups-v2 since OCP 4.14 (see OCPSTRAT-696).
System depends on some cgroups v1 files to detect the CPU shares for calculating the appropriate number of Unicorn workers (the value can be overriden by UNICORN_WORKERS and UNICORN_WORKER_MULTIPLIER env vars).
Specifically, the code checks the value of /sys/fs/cgroup/cpu/cpu.shares which is not present when using cgroups-v2. Instead of CPU shares, CPU weight is used.
More information about this change: https://linuxera.org/cpu-memory-management-kubernetes-cgroupsv2/#cpu-bandwidth-configuration-on-the-node
The article also has some links to the kubernetes source code. Particularly, these are interesting:
We probably need to find a better way to detect the amount of available (requested) CPU, independently of the cgroups version used by the cluster.
- is related to
-
THREESCALE-10167 Improve CPU detection for the unicorn workers number
- Closed