Linux / CFS: How do cgroupsv1 cpu.share / cgroupsv2 cpu.weight and nice process weights interact
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
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?
scheduling cgroups nice
add a comment |Â
up vote
0
down vote
favorite
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?
scheduling cgroups nice
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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?
scheduling cgroups nice
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?
scheduling cgroups nice
edited Dec 19 '17 at 13:54
asked Dec 14 '17 at 18:24
Till Schäfer
24626
24626
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410924%2flinux-cfs-how-do-cgroupsv1-cpu-share-cgroupsv2-cpu-weight-and-nice-process%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password