Answer the question
In order to leave comments, you need to log in
Are requests for Cgroups CPU shares equal when running Kubernetes on nodes with different number of cores (using Docker)?
I conducted a couple of experiments
On an 8 -core system and on a 4 - core system, I set 100m
up a CPU request for a container in Kubernetes
in both cases, it eventually ended up at the cgroups level in the same way (as I actually expected) cpu.shares=102
The Kubernetes documentation in the “ Meaning of CPU ” section says
CPU is always requested as an absolute quantity, never as a relative quantity; 0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine.
When using Docker:
- The spec.containers[].resources.requests.cpu is converted to its core value, which is potentially fractional, and multiplied by 1024. The greater of this number or 2 is used as the value of the -- cpu-shares flag in the docker run command.
0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine
A ball is a relative numerical parameter; its value only makes sense in comparison with the values of other shares in the same cgroup
Answer the question
In order to leave comments, you need to log in
Not equal, the value of shares will always be relative, from which I concluded that this sentence refers to limits that will be absolute on any system.
0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine
0.1 is the same amount of CPU on a single-core, dual-core, or 48-core machine
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question