Where are systemd's configurations for cgroups?

The name of the pictureThe name of the pictureThe name of the pictureClash 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.







share|improve this question
























    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.







    share|improve this question






















      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.







      share|improve this question












      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.









      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 5 at 16:27









      offbynull

      61




      61




















          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.







          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            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






























            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.







            share|improve this answer
























              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.







              share|improve this answer






















                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.







                share|improve this answer












                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.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 5 at 18:30









                Mark Stosberg

                3,5241023




                3,5241023






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    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













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay