What is ionice `none: prio 0` equivalent to?











up vote
6
down vote

favorite
1












The ionice manual states that:




Note that before kernel 2.6.26 a process that has not asked for an io
priority formally uses "none" as scheduling class, but the io
scheduler will treat such processes as if it were in the best effort
class. The priority within the best effort class will be dynamically
derived from the cpu nice level of the process: io_priority =
(cpu_nice + 20) / 5.



For kernels after 2.6.26 with CFQ io scheduler a process that has not asked for an io priority inherits CPU scheduling class. The io
priority is derived from the cpu nice level of the process (same as
before kernel 2.6.26).




I am post 2.6.26, but that still leaves some open questions (I'm assuming CFQ):




  1. What is the inheritance mapping for the scheduled class? Does TS SCHED_OTHER = Best Effort (io class 2)?


  2. When using the ionice -p command to get the value, it returns none: prio 0. However, the formula mentioned in the ionice man would suggest that the same process (cpu nice of zero) would be best-effort: prio 4 since (0 + 20) / 5 = 4.



So my assumption at this point is that none: prio 0 = best-effort: prio 4, but I'm hoping someone can cite some kernel source in order to prove that this is authoritatively true.










share|improve this question




























    up vote
    6
    down vote

    favorite
    1












    The ionice manual states that:




    Note that before kernel 2.6.26 a process that has not asked for an io
    priority formally uses "none" as scheduling class, but the io
    scheduler will treat such processes as if it were in the best effort
    class. The priority within the best effort class will be dynamically
    derived from the cpu nice level of the process: io_priority =
    (cpu_nice + 20) / 5.



    For kernels after 2.6.26 with CFQ io scheduler a process that has not asked for an io priority inherits CPU scheduling class. The io
    priority is derived from the cpu nice level of the process (same as
    before kernel 2.6.26).




    I am post 2.6.26, but that still leaves some open questions (I'm assuming CFQ):




    1. What is the inheritance mapping for the scheduled class? Does TS SCHED_OTHER = Best Effort (io class 2)?


    2. When using the ionice -p command to get the value, it returns none: prio 0. However, the formula mentioned in the ionice man would suggest that the same process (cpu nice of zero) would be best-effort: prio 4 since (0 + 20) / 5 = 4.



    So my assumption at this point is that none: prio 0 = best-effort: prio 4, but I'm hoping someone can cite some kernel source in order to prove that this is authoritatively true.










    share|improve this question


























      up vote
      6
      down vote

      favorite
      1









      up vote
      6
      down vote

      favorite
      1






      1





      The ionice manual states that:




      Note that before kernel 2.6.26 a process that has not asked for an io
      priority formally uses "none" as scheduling class, but the io
      scheduler will treat such processes as if it were in the best effort
      class. The priority within the best effort class will be dynamically
      derived from the cpu nice level of the process: io_priority =
      (cpu_nice + 20) / 5.



      For kernels after 2.6.26 with CFQ io scheduler a process that has not asked for an io priority inherits CPU scheduling class. The io
      priority is derived from the cpu nice level of the process (same as
      before kernel 2.6.26).




      I am post 2.6.26, but that still leaves some open questions (I'm assuming CFQ):




      1. What is the inheritance mapping for the scheduled class? Does TS SCHED_OTHER = Best Effort (io class 2)?


      2. When using the ionice -p command to get the value, it returns none: prio 0. However, the formula mentioned in the ionice man would suggest that the same process (cpu nice of zero) would be best-effort: prio 4 since (0 + 20) / 5 = 4.



      So my assumption at this point is that none: prio 0 = best-effort: prio 4, but I'm hoping someone can cite some kernel source in order to prove that this is authoritatively true.










      share|improve this question















      The ionice manual states that:




      Note that before kernel 2.6.26 a process that has not asked for an io
      priority formally uses "none" as scheduling class, but the io
      scheduler will treat such processes as if it were in the best effort
      class. The priority within the best effort class will be dynamically
      derived from the cpu nice level of the process: io_priority =
      (cpu_nice + 20) / 5.



      For kernels after 2.6.26 with CFQ io scheduler a process that has not asked for an io priority inherits CPU scheduling class. The io
      priority is derived from the cpu nice level of the process (same as
      before kernel 2.6.26).




      I am post 2.6.26, but that still leaves some open questions (I'm assuming CFQ):




      1. What is the inheritance mapping for the scheduled class? Does TS SCHED_OTHER = Best Effort (io class 2)?


      2. When using the ionice -p command to get the value, it returns none: prio 0. However, the formula mentioned in the ionice man would suggest that the same process (cpu nice of zero) would be best-effort: prio 4 since (0 + 20) / 5 = 4.



      So my assumption at this point is that none: prio 0 = best-effort: prio 4, but I'm hoping someone can cite some kernel source in order to prove that this is authoritatively true.







      linux ionice






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 7 '13 at 17:51

























      asked Aug 7 '13 at 17:26









      Kyle Brandt

      392114




      392114






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          1)
          From the docs sched-design-CFS.txt:




          CFS stands for "Completely Fair Scheduler," and is the new "desktop" process
          scheduler implemented by Ingo Molnar and merged in Linux 2.6.23. It is the
          replacement for the previous vanilla scheduler's SCHED_OTHER interactivity
          code.




          It seems you mixing up the O(1) scheduler with the CFQ io-scheduler.



          So there are SCHED_{NORMAL, BATCH, IDLE} policies. IDLE does not have any priorities. And sched classes idle, best-effort and realtime.



          2) Sadly you do not show what commands you typed. For example change init's io-scheduling to best-effort class




          # ionice -p 1

          none: prio 0

          # ionice -c2 20 -p 1

          # ionice -p 1

          best-effort: prio 4







          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: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            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%2f85860%2fwhat-is-ionice-none-prio-0-equivalent-to%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            1)
            From the docs sched-design-CFS.txt:




            CFS stands for "Completely Fair Scheduler," and is the new "desktop" process
            scheduler implemented by Ingo Molnar and merged in Linux 2.6.23. It is the
            replacement for the previous vanilla scheduler's SCHED_OTHER interactivity
            code.




            It seems you mixing up the O(1) scheduler with the CFQ io-scheduler.



            So there are SCHED_{NORMAL, BATCH, IDLE} policies. IDLE does not have any priorities. And sched classes idle, best-effort and realtime.



            2) Sadly you do not show what commands you typed. For example change init's io-scheduling to best-effort class




            # ionice -p 1

            none: prio 0

            # ionice -c2 20 -p 1

            # ionice -p 1

            best-effort: prio 4







            share|improve this answer

























              up vote
              0
              down vote













              1)
              From the docs sched-design-CFS.txt:




              CFS stands for "Completely Fair Scheduler," and is the new "desktop" process
              scheduler implemented by Ingo Molnar and merged in Linux 2.6.23. It is the
              replacement for the previous vanilla scheduler's SCHED_OTHER interactivity
              code.




              It seems you mixing up the O(1) scheduler with the CFQ io-scheduler.



              So there are SCHED_{NORMAL, BATCH, IDLE} policies. IDLE does not have any priorities. And sched classes idle, best-effort and realtime.



              2) Sadly you do not show what commands you typed. For example change init's io-scheduling to best-effort class




              # ionice -p 1

              none: prio 0

              # ionice -c2 20 -p 1

              # ionice -p 1

              best-effort: prio 4







              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                1)
                From the docs sched-design-CFS.txt:




                CFS stands for "Completely Fair Scheduler," and is the new "desktop" process
                scheduler implemented by Ingo Molnar and merged in Linux 2.6.23. It is the
                replacement for the previous vanilla scheduler's SCHED_OTHER interactivity
                code.




                It seems you mixing up the O(1) scheduler with the CFQ io-scheduler.



                So there are SCHED_{NORMAL, BATCH, IDLE} policies. IDLE does not have any priorities. And sched classes idle, best-effort and realtime.



                2) Sadly you do not show what commands you typed. For example change init's io-scheduling to best-effort class




                # ionice -p 1

                none: prio 0

                # ionice -c2 20 -p 1

                # ionice -p 1

                best-effort: prio 4







                share|improve this answer












                1)
                From the docs sched-design-CFS.txt:




                CFS stands for "Completely Fair Scheduler," and is the new "desktop" process
                scheduler implemented by Ingo Molnar and merged in Linux 2.6.23. It is the
                replacement for the previous vanilla scheduler's SCHED_OTHER interactivity
                code.




                It seems you mixing up the O(1) scheduler with the CFQ io-scheduler.



                So there are SCHED_{NORMAL, BATCH, IDLE} policies. IDLE does not have any priorities. And sched classes idle, best-effort and realtime.



                2) Sadly you do not show what commands you typed. For example change init's io-scheduling to best-effort class




                # ionice -p 1

                none: prio 0

                # ionice -c2 20 -p 1

                # ionice -p 1

                best-effort: prio 4








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 30 '13 at 22:40







                user55518





































                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f85860%2fwhat-is-ionice-none-prio-0-equivalent-to%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Morgemoulin

                    Scott Moir

                    Souastre