Linux / CFS: How do cgroupsv1 cpu.share / cgroupsv2 cpu.weight and nice process weights interact

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



  1. Are the two weights multiplied/mixed?

  2. Are cgroup shares respected in the first order and the niceness values only applied to resource conflicts in the same cgroup?

  3. 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?







share|improve this question


























    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?



    1. Are the two weights multiplied/mixed?

    2. Are cgroup shares respected in the first order and the niceness values only applied to resource conflicts in the same cgroup?

    3. 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?







    share|improve this question
























      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?



      1. Are the two weights multiplied/mixed?

      2. Are cgroup shares respected in the first order and the niceness values only applied to resource conflicts in the same cgroup?

      3. 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?







      share|improve this question














      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?



      1. Are the two weights multiplied/mixed?

      2. Are cgroup shares respected in the first order and the niceness values only applied to resource conflicts in the same cgroup?

      3. 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?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 19 '17 at 13:54

























      asked Dec 14 '17 at 18:24









      Till Schäfer

      24626




      24626

























          active

          oldest

          votes











          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%2f410924%2flinux-cfs-how-do-cgroupsv1-cpu-share-cgroupsv2-cpu-weight-and-nice-process%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

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

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?