dirty_ratio per device

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












I've recently examined a RHEL7.2 that hanged almost totally just because it have written to a CIFS filesystem. With the default settings of dirty_ratio = 30 and cifs being cached (for both reading and writing), these dirty pages were mostly cifs ones.



Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)



I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive. It's just insensible to have a single dirty_ratio bag, it quickly leads to the situation where 30% of RAM contains dirty data from the slowest devices. What a waste of money.



The situation is reproducible; setting dirty_ratio = 1 solves the problem completely. But why do I need to sacrifice the cache of local disks just because I use a cifs mount?



Other than completely disabling caching of some devices, or setting vm.dirty_ratio to a very low value, are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?










share|improve this question



























    up vote
    3
    down vote

    favorite
    1












    I've recently examined a RHEL7.2 that hanged almost totally just because it have written to a CIFS filesystem. With the default settings of dirty_ratio = 30 and cifs being cached (for both reading and writing), these dirty pages were mostly cifs ones.



    Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)



    I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive. It's just insensible to have a single dirty_ratio bag, it quickly leads to the situation where 30% of RAM contains dirty data from the slowest devices. What a waste of money.



    The situation is reproducible; setting dirty_ratio = 1 solves the problem completely. But why do I need to sacrifice the cache of local disks just because I use a cifs mount?



    Other than completely disabling caching of some devices, or setting vm.dirty_ratio to a very low value, are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?










    share|improve this question

























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      I've recently examined a RHEL7.2 that hanged almost totally just because it have written to a CIFS filesystem. With the default settings of dirty_ratio = 30 and cifs being cached (for both reading and writing), these dirty pages were mostly cifs ones.



      Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)



      I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive. It's just insensible to have a single dirty_ratio bag, it quickly leads to the situation where 30% of RAM contains dirty data from the slowest devices. What a waste of money.



      The situation is reproducible; setting dirty_ratio = 1 solves the problem completely. But why do I need to sacrifice the cache of local disks just because I use a cifs mount?



      Other than completely disabling caching of some devices, or setting vm.dirty_ratio to a very low value, are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?










      share|improve this question















      I've recently examined a RHEL7.2 that hanged almost totally just because it have written to a CIFS filesystem. With the default settings of dirty_ratio = 30 and cifs being cached (for both reading and writing), these dirty pages were mostly cifs ones.



      Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)



      I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive. It's just insensible to have a single dirty_ratio bag, it quickly leads to the situation where 30% of RAM contains dirty data from the slowest devices. What a waste of money.



      The situation is reproducible; setting dirty_ratio = 1 solves the problem completely. But why do I need to sacrifice the cache of local disks just because I use a cifs mount?



      Other than completely disabling caching of some devices, or setting vm.dirty_ratio to a very low value, are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?







      rhel linux-kernel nfs cache cifs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 4 '17 at 13:45









      Jeff Schaller

      35.7k952119




      35.7k952119










      asked Jan 3 '17 at 0:09









      kubanczyk

      804512




      804512




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted











          Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?




          It is possible to set limits manually. The bdi ("backing device") object has a sysfs attribute max_ratio. min_ratio can also be used to make some sort of reservation, but I don't know exactly what that means.



          https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi



          Currently, these limits will only start to take effect in once the global writeback cache has filled up to dirty_ratio + dirty_background_ratio / 2.



          https://lore.kernel.org/lkml/20131029203050.GE9568@quack.suse.cz/





          Q: I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive.




          Actually, the sysfs-class-bdi document claims:




          Under normal circumstances each device is given a part of the
          total write-back cache that relates to its current average
          writeout speed in relation to the other devices.






          Q: Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)




          Here is one possible explanation:



          "memory pressure" can actually decrease the limit calculated by dirty_ratio. dirty_ratio is actually a percentage of "available" memory, which means free memory + page cache. So if "available" memory goes down? It must put pressure on the size of the writeback cache, in some way. I'm not certain what happens, if the writeback cache you need to shrink is for a very slow device, but it sounds like a difficult case to handle.



          See Writeback cache (`dirty`) seems to be limited to even less than dirty_background_ratio. What is it being limited by? How is this limit calculated?



          I've seen some kernel code that handles a related possibility, where one BDI is completely non-responsive. It tries to make sure other BDI's can still make forward progress, but... they would be much more limited in how much writeback cache they can use. Performance would likely be degraded, even if there is only one writer.






          share|improve this answer





























            up vote
            2
            down vote













            After experimenting, I've found out that dirty_ratio "bag" is quite properly balanced. The processes that make pages dirty are somehow constrained. One cp process can easily take almost all the write cache possible, but even if you run 10 competing processes bursting, they rarely reach the write cache cap (dirty_ratio) at all.



            Therefore, I attribute all the trouble to that CIFS-related bug I've mentioned. If more processes want to write to fast local disk, kernel would have used less for CIFS. Here, more processes wanted to just use memory and kernel couldn't flush&reclaim a large CIFS write cache due to said bug. Probably the 30% dirty_ratio wouldn't be a problem if not the bug.






            share|improve this answer




















            • For testing filling the writeback cache, I found it's useful to make sure you're not limited by reads, e.g. do not cp from the same disk, instead I used dd if=/dev/zero bs=1M of=x.
              – sourcejedi
              22 hours ago


















            up vote
            2
            down vote













            I think you can set the proportion of the dirty ratio per device via



            echo RATIO > /sys/class/bdi/MAJOR:MINOR/max_ratio






            share|improve this answer
















            • 2




              The RATIO above should be a percentage between 0 and 100 of the global max dirty pages cache (/proc/sys/vm/dirty_bytes or /proc/sys/vm/dirty_ratio). See kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi for details.
              – Mikko Rantalainen
              May 17 '17 at 10:09










            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%2f334415%2fdirty-ratio-per-device%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted











            Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?




            It is possible to set limits manually. The bdi ("backing device") object has a sysfs attribute max_ratio. min_ratio can also be used to make some sort of reservation, but I don't know exactly what that means.



            https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi



            Currently, these limits will only start to take effect in once the global writeback cache has filled up to dirty_ratio + dirty_background_ratio / 2.



            https://lore.kernel.org/lkml/20131029203050.GE9568@quack.suse.cz/





            Q: I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive.




            Actually, the sysfs-class-bdi document claims:




            Under normal circumstances each device is given a part of the
            total write-back cache that relates to its current average
            writeout speed in relation to the other devices.






            Q: Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)




            Here is one possible explanation:



            "memory pressure" can actually decrease the limit calculated by dirty_ratio. dirty_ratio is actually a percentage of "available" memory, which means free memory + page cache. So if "available" memory goes down? It must put pressure on the size of the writeback cache, in some way. I'm not certain what happens, if the writeback cache you need to shrink is for a very slow device, but it sounds like a difficult case to handle.



            See Writeback cache (`dirty`) seems to be limited to even less than dirty_background_ratio. What is it being limited by? How is this limit calculated?



            I've seen some kernel code that handles a related possibility, where one BDI is completely non-responsive. It tries to make sure other BDI's can still make forward progress, but... they would be much more limited in how much writeback cache they can use. Performance would likely be degraded, even if there is only one writer.






            share|improve this answer


























              up vote
              1
              down vote



              accepted











              Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?




              It is possible to set limits manually. The bdi ("backing device") object has a sysfs attribute max_ratio. min_ratio can also be used to make some sort of reservation, but I don't know exactly what that means.



              https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi



              Currently, these limits will only start to take effect in once the global writeback cache has filled up to dirty_ratio + dirty_background_ratio / 2.



              https://lore.kernel.org/lkml/20131029203050.GE9568@quack.suse.cz/





              Q: I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive.




              Actually, the sysfs-class-bdi document claims:




              Under normal circumstances each device is given a part of the
              total write-back cache that relates to its current average
              writeout speed in relation to the other devices.






              Q: Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)




              Here is one possible explanation:



              "memory pressure" can actually decrease the limit calculated by dirty_ratio. dirty_ratio is actually a percentage of "available" memory, which means free memory + page cache. So if "available" memory goes down? It must put pressure on the size of the writeback cache, in some way. I'm not certain what happens, if the writeback cache you need to shrink is for a very slow device, but it sounds like a difficult case to handle.



              See Writeback cache (`dirty`) seems to be limited to even less than dirty_background_ratio. What is it being limited by? How is this limit calculated?



              I've seen some kernel code that handles a related possibility, where one BDI is completely non-responsive. It tries to make sure other BDI's can still make forward progress, but... they would be much more limited in how much writeback cache they can use. Performance would likely be degraded, even if there is only one writer.






              share|improve this answer
























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted







                Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?




                It is possible to set limits manually. The bdi ("backing device") object has a sysfs attribute max_ratio. min_ratio can also be used to make some sort of reservation, but I don't know exactly what that means.



                https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi



                Currently, these limits will only start to take effect in once the global writeback cache has filled up to dirty_ratio + dirty_background_ratio / 2.



                https://lore.kernel.org/lkml/20131029203050.GE9568@quack.suse.cz/





                Q: I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive.




                Actually, the sysfs-class-bdi document claims:




                Under normal circumstances each device is given a part of the
                total write-back cache that relates to its current average
                writeout speed in relation to the other devices.






                Q: Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)




                Here is one possible explanation:



                "memory pressure" can actually decrease the limit calculated by dirty_ratio. dirty_ratio is actually a percentage of "available" memory, which means free memory + page cache. So if "available" memory goes down? It must put pressure on the size of the writeback cache, in some way. I'm not certain what happens, if the writeback cache you need to shrink is for a very slow device, but it sounds like a difficult case to handle.



                See Writeback cache (`dirty`) seems to be limited to even less than dirty_background_ratio. What is it being limited by? How is this limit calculated?



                I've seen some kernel code that handles a related possibility, where one BDI is completely non-responsive. It tries to make sure other BDI's can still make forward progress, but... they would be much more limited in how much writeback cache they can use. Performance would likely be degraded, even if there is only one writer.






                share|improve this answer















                Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache?




                It is possible to set limits manually. The bdi ("backing device") object has a sysfs attribute max_ratio. min_ratio can also be used to make some sort of reservation, but I don't know exactly what that means.



                https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi



                Currently, these limits will only start to take effect in once the global writeback cache has filled up to dirty_ratio + dirty_background_ratio / 2.



                https://lore.kernel.org/lkml/20131029203050.GE9568@quack.suse.cz/





                Q: I was flabbergasted to find out that kernel treated flushing pages to some slow remote CIFS box in exactly the same way as to super-fast local SSD drive.




                Actually, the sysfs-class-bdi document claims:




                Under normal circumstances each device is given a part of the
                total write-back cache that relates to its current average
                writeout speed in relation to the other devices.






                Q: Under memory pressure, when system reclaimed most of the read cache, system stubbornly tried to flush&reclaim the dirty (write) cache. So the situation was a huge CPU iowait accompanied with an excellent local disk I/O completion time, a lot of processes in D uninterruptible wait and a totally unresponsive system. OOM killer never engaged, because there was free memory that system wasn't giving out. (I think there is also a bug with CIFS, that crawled the flushing to incredibly slow speeds. But nevermind that here.)




                Here is one possible explanation:



                "memory pressure" can actually decrease the limit calculated by dirty_ratio. dirty_ratio is actually a percentage of "available" memory, which means free memory + page cache. So if "available" memory goes down? It must put pressure on the size of the writeback cache, in some way. I'm not certain what happens, if the writeback cache you need to shrink is for a very slow device, but it sounds like a difficult case to handle.



                See Writeback cache (`dirty`) seems to be limited to even less than dirty_background_ratio. What is it being limited by? How is this limit calculated?



                I've seen some kernel code that handles a related possibility, where one BDI is completely non-responsive. It tries to make sure other BDI's can still make forward progress, but... they would be much more limited in how much writeback cache they can use. Performance would likely be degraded, even if there is only one writer.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 22 hours ago

























                answered 22 hours ago









                sourcejedi

                21.6k43396




                21.6k43396






















                    up vote
                    2
                    down vote













                    After experimenting, I've found out that dirty_ratio "bag" is quite properly balanced. The processes that make pages dirty are somehow constrained. One cp process can easily take almost all the write cache possible, but even if you run 10 competing processes bursting, they rarely reach the write cache cap (dirty_ratio) at all.



                    Therefore, I attribute all the trouble to that CIFS-related bug I've mentioned. If more processes want to write to fast local disk, kernel would have used less for CIFS. Here, more processes wanted to just use memory and kernel couldn't flush&reclaim a large CIFS write cache due to said bug. Probably the 30% dirty_ratio wouldn't be a problem if not the bug.






                    share|improve this answer




















                    • For testing filling the writeback cache, I found it's useful to make sure you're not limited by reads, e.g. do not cp from the same disk, instead I used dd if=/dev/zero bs=1M of=x.
                      – sourcejedi
                      22 hours ago















                    up vote
                    2
                    down vote













                    After experimenting, I've found out that dirty_ratio "bag" is quite properly balanced. The processes that make pages dirty are somehow constrained. One cp process can easily take almost all the write cache possible, but even if you run 10 competing processes bursting, they rarely reach the write cache cap (dirty_ratio) at all.



                    Therefore, I attribute all the trouble to that CIFS-related bug I've mentioned. If more processes want to write to fast local disk, kernel would have used less for CIFS. Here, more processes wanted to just use memory and kernel couldn't flush&reclaim a large CIFS write cache due to said bug. Probably the 30% dirty_ratio wouldn't be a problem if not the bug.






                    share|improve this answer




















                    • For testing filling the writeback cache, I found it's useful to make sure you're not limited by reads, e.g. do not cp from the same disk, instead I used dd if=/dev/zero bs=1M of=x.
                      – sourcejedi
                      22 hours ago













                    up vote
                    2
                    down vote










                    up vote
                    2
                    down vote









                    After experimenting, I've found out that dirty_ratio "bag" is quite properly balanced. The processes that make pages dirty are somehow constrained. One cp process can easily take almost all the write cache possible, but even if you run 10 competing processes bursting, they rarely reach the write cache cap (dirty_ratio) at all.



                    Therefore, I attribute all the trouble to that CIFS-related bug I've mentioned. If more processes want to write to fast local disk, kernel would have used less for CIFS. Here, more processes wanted to just use memory and kernel couldn't flush&reclaim a large CIFS write cache due to said bug. Probably the 30% dirty_ratio wouldn't be a problem if not the bug.






                    share|improve this answer












                    After experimenting, I've found out that dirty_ratio "bag" is quite properly balanced. The processes that make pages dirty are somehow constrained. One cp process can easily take almost all the write cache possible, but even if you run 10 competing processes bursting, they rarely reach the write cache cap (dirty_ratio) at all.



                    Therefore, I attribute all the trouble to that CIFS-related bug I've mentioned. If more processes want to write to fast local disk, kernel would have used less for CIFS. Here, more processes wanted to just use memory and kernel couldn't flush&reclaim a large CIFS write cache due to said bug. Probably the 30% dirty_ratio wouldn't be a problem if not the bug.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 5 '17 at 11:37









                    kubanczyk

                    804512




                    804512











                    • For testing filling the writeback cache, I found it's useful to make sure you're not limited by reads, e.g. do not cp from the same disk, instead I used dd if=/dev/zero bs=1M of=x.
                      – sourcejedi
                      22 hours ago

















                    • For testing filling the writeback cache, I found it's useful to make sure you're not limited by reads, e.g. do not cp from the same disk, instead I used dd if=/dev/zero bs=1M of=x.
                      – sourcejedi
                      22 hours ago
















                    For testing filling the writeback cache, I found it's useful to make sure you're not limited by reads, e.g. do not cp from the same disk, instead I used dd if=/dev/zero bs=1M of=x.
                    – sourcejedi
                    22 hours ago





                    For testing filling the writeback cache, I found it's useful to make sure you're not limited by reads, e.g. do not cp from the same disk, instead I used dd if=/dev/zero bs=1M of=x.
                    – sourcejedi
                    22 hours ago











                    up vote
                    2
                    down vote













                    I think you can set the proportion of the dirty ratio per device via



                    echo RATIO > /sys/class/bdi/MAJOR:MINOR/max_ratio






                    share|improve this answer
















                    • 2




                      The RATIO above should be a percentage between 0 and 100 of the global max dirty pages cache (/proc/sys/vm/dirty_bytes or /proc/sys/vm/dirty_ratio). See kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi for details.
                      – Mikko Rantalainen
                      May 17 '17 at 10:09














                    up vote
                    2
                    down vote













                    I think you can set the proportion of the dirty ratio per device via



                    echo RATIO > /sys/class/bdi/MAJOR:MINOR/max_ratio






                    share|improve this answer
















                    • 2




                      The RATIO above should be a percentage between 0 and 100 of the global max dirty pages cache (/proc/sys/vm/dirty_bytes or /proc/sys/vm/dirty_ratio). See kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi for details.
                      – Mikko Rantalainen
                      May 17 '17 at 10:09












                    up vote
                    2
                    down vote










                    up vote
                    2
                    down vote









                    I think you can set the proportion of the dirty ratio per device via



                    echo RATIO > /sys/class/bdi/MAJOR:MINOR/max_ratio






                    share|improve this answer












                    I think you can set the proportion of the dirty ratio per device via



                    echo RATIO > /sys/class/bdi/MAJOR:MINOR/max_ratio







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 18 '17 at 13:11









                    UrOni

                    1211




                    1211







                    • 2




                      The RATIO above should be a percentage between 0 and 100 of the global max dirty pages cache (/proc/sys/vm/dirty_bytes or /proc/sys/vm/dirty_ratio). See kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi for details.
                      – Mikko Rantalainen
                      May 17 '17 at 10:09












                    • 2




                      The RATIO above should be a percentage between 0 and 100 of the global max dirty pages cache (/proc/sys/vm/dirty_bytes or /proc/sys/vm/dirty_ratio). See kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi for details.
                      – Mikko Rantalainen
                      May 17 '17 at 10:09







                    2




                    2




                    The RATIO above should be a percentage between 0 and 100 of the global max dirty pages cache (/proc/sys/vm/dirty_bytes or /proc/sys/vm/dirty_ratio). See kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi for details.
                    – Mikko Rantalainen
                    May 17 '17 at 10:09




                    The RATIO above should be a percentage between 0 and 100 of the global max dirty pages cache (/proc/sys/vm/dirty_bytes or /proc/sys/vm/dirty_ratio). See kernel.org/doc/Documentation/ABI/testing/sysfs-class-bdi for details.
                    – Mikko Rantalainen
                    May 17 '17 at 10:09

















                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f334415%2fdirty-ratio-per-device%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)