I was wondering how cgroup cpu shares/weights (v1: cpu.shares or v2: cpu.weight) and the niceness value of a task do interact in Linux with the CFS (Completely Fair Scheduler). Both values have an influence on the weighting of process relative to other processes.
The questions is: What happens if you mix the two concepts?
- Are the two weights multiplied/mixed?
- Are cgroup shares respected in the first order and the niceness values only applied to resource conflicts in the same cgroup?
- Some other model I cannot imagine.
Example: If I have a single process in a cgroup and all other processes in another cgroup. Both cgroups have cpu.shares/weight set to an arbitrary value. Does the nice value of the single process influence the absolute weight of the single cgroup process relative to the other processes?