Where are systemd's configurations for cgroups?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
My understanding is that, by default, systemd will start all processes under a single cgroup where cpu.share=1024. If you choose to override the cpu.share for a service, it will create a new cgroup for the processes under that service with cpu.share set to whatever value you've chosen.
I want to manually create a new cgroup with a custom cpu.share that gives me 60% of the CPU. To do that, I need to know the cpu.share values for all existing cgroups. Where is systemd setting these values? Is there an easy way for me to get this? /sys/fs/cgroup/cpu only contains the root group (set to 1024) and the groups I've manually created.
systemd cgroups
add a comment |Â
up vote
1
down vote
favorite
My understanding is that, by default, systemd will start all processes under a single cgroup where cpu.share=1024. If you choose to override the cpu.share for a service, it will create a new cgroup for the processes under that service with cpu.share set to whatever value you've chosen.
I want to manually create a new cgroup with a custom cpu.share that gives me 60% of the CPU. To do that, I need to know the cpu.share values for all existing cgroups. Where is systemd setting these values? Is there an easy way for me to get this? /sys/fs/cgroup/cpu only contains the root group (set to 1024) and the groups I've manually created.
systemd cgroups
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
My understanding is that, by default, systemd will start all processes under a single cgroup where cpu.share=1024. If you choose to override the cpu.share for a service, it will create a new cgroup for the processes under that service with cpu.share set to whatever value you've chosen.
I want to manually create a new cgroup with a custom cpu.share that gives me 60% of the CPU. To do that, I need to know the cpu.share values for all existing cgroups. Where is systemd setting these values? Is there an easy way for me to get this? /sys/fs/cgroup/cpu only contains the root group (set to 1024) and the groups I've manually created.
systemd cgroups
My understanding is that, by default, systemd will start all processes under a single cgroup where cpu.share=1024. If you choose to override the cpu.share for a service, it will create a new cgroup for the processes under that service with cpu.share set to whatever value you've chosen.
I want to manually create a new cgroup with a custom cpu.share that gives me 60% of the CPU. To do that, I need to know the cpu.share values for all existing cgroups. Where is systemd setting these values? Is there an easy way for me to get this? /sys/fs/cgroup/cpu only contains the root group (set to 1024) and the groups I've manually created.
systemd cgroups
asked Mar 5 at 16:27
offbynull
61
61
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
systemd's CGroup options are documented in `man systemd.exec. It sounds like the one you are looking for is:
`CPUWeight=`
Assign the specified CPU time weight to the processes executed, if the unified control group hierarchy is used on the system. These options take an integer
value and control the "cpu.weight" control group attribute. The allowed range is 1 to 10000. Defaults to 100. For details about this control group attribute,
see cgroup-v2.txt[2] and sched-design-CFS.txt[5]. The available CPU time is split up among all units within one slice relative to their CPU time weight.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
systemd's CGroup options are documented in `man systemd.exec. It sounds like the one you are looking for is:
`CPUWeight=`
Assign the specified CPU time weight to the processes executed, if the unified control group hierarchy is used on the system. These options take an integer
value and control the "cpu.weight" control group attribute. The allowed range is 1 to 10000. Defaults to 100. For details about this control group attribute,
see cgroup-v2.txt[2] and sched-design-CFS.txt[5]. The available CPU time is split up among all units within one slice relative to their CPU time weight.
add a comment |Â
up vote
1
down vote
systemd's CGroup options are documented in `man systemd.exec. It sounds like the one you are looking for is:
`CPUWeight=`
Assign the specified CPU time weight to the processes executed, if the unified control group hierarchy is used on the system. These options take an integer
value and control the "cpu.weight" control group attribute. The allowed range is 1 to 10000. Defaults to 100. For details about this control group attribute,
see cgroup-v2.txt[2] and sched-design-CFS.txt[5]. The available CPU time is split up among all units within one slice relative to their CPU time weight.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
systemd's CGroup options are documented in `man systemd.exec. It sounds like the one you are looking for is:
`CPUWeight=`
Assign the specified CPU time weight to the processes executed, if the unified control group hierarchy is used on the system. These options take an integer
value and control the "cpu.weight" control group attribute. The allowed range is 1 to 10000. Defaults to 100. For details about this control group attribute,
see cgroup-v2.txt[2] and sched-design-CFS.txt[5]. The available CPU time is split up among all units within one slice relative to their CPU time weight.
systemd's CGroup options are documented in `man systemd.exec. It sounds like the one you are looking for is:
`CPUWeight=`
Assign the specified CPU time weight to the processes executed, if the unified control group hierarchy is used on the system. These options take an integer
value and control the "cpu.weight" control group attribute. The allowed range is 1 to 10000. Defaults to 100. For details about this control group attribute,
see cgroup-v2.txt[2] and sched-design-CFS.txt[5]. The available CPU time is split up among all units within one slice relative to their CPU time weight.
answered Mar 5 at 18:30
Mark Stosberg
3,5241023
3,5241023
add a comment |Â
add a comment |Â
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%2f428317%2fwhere-are-systemds-configurations-for-cgroups%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