How to force the kernel to always maintain at least some page cache?

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











up vote
1
down vote

favorite












Is there any way to force the kernel to always maintain at least some page cache for writeback caching purposes, even when faced with memory pressure?



I have a rather special use case, where swapping to zswap is much more preferable than not having a large page cache. (I have set the relevant vm.dirty values to allow a lot of write caching)



So what I would like, is set a minimum page cache size (say 10-30% of total RAM), and if memory usage rises, instead of flushing dirty pages, the kernel should start swapping (I am using zswap, so that would just mean compressing pages, but still keeping most of them in RAM)



I have tried raising vm.swappiness to 100, and lowering vm.vfs_cache_pressure to 10, but this does not seem to have cut it.










share|improve this question







New contributor




uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    1
    down vote

    favorite












    Is there any way to force the kernel to always maintain at least some page cache for writeback caching purposes, even when faced with memory pressure?



    I have a rather special use case, where swapping to zswap is much more preferable than not having a large page cache. (I have set the relevant vm.dirty values to allow a lot of write caching)



    So what I would like, is set a minimum page cache size (say 10-30% of total RAM), and if memory usage rises, instead of flushing dirty pages, the kernel should start swapping (I am using zswap, so that would just mean compressing pages, but still keeping most of them in RAM)



    I have tried raising vm.swappiness to 100, and lowering vm.vfs_cache_pressure to 10, but this does not seem to have cut it.










    share|improve this question







    New contributor




    uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Is there any way to force the kernel to always maintain at least some page cache for writeback caching purposes, even when faced with memory pressure?



      I have a rather special use case, where swapping to zswap is much more preferable than not having a large page cache. (I have set the relevant vm.dirty values to allow a lot of write caching)



      So what I would like, is set a minimum page cache size (say 10-30% of total RAM), and if memory usage rises, instead of flushing dirty pages, the kernel should start swapping (I am using zswap, so that would just mean compressing pages, but still keeping most of them in RAM)



      I have tried raising vm.swappiness to 100, and lowering vm.vfs_cache_pressure to 10, but this does not seem to have cut it.










      share|improve this question







      New contributor




      uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Is there any way to force the kernel to always maintain at least some page cache for writeback caching purposes, even when faced with memory pressure?



      I have a rather special use case, where swapping to zswap is much more preferable than not having a large page cache. (I have set the relevant vm.dirty values to allow a lot of write caching)



      So what I would like, is set a minimum page cache size (say 10-30% of total RAM), and if memory usage rises, instead of flushing dirty pages, the kernel should start swapping (I am using zswap, so that would just mean compressing pages, but still keeping most of them in RAM)



      I have tried raising vm.swappiness to 100, and lowering vm.vfs_cache_pressure to 10, but this does not seem to have cut it.







      memory swap cache virtual-memory memory-management






      share|improve this question







      New contributor




      uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 days ago









      uLoop

      1062




      1062




      New contributor




      uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      uLoop is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          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: 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
          );



          );






          uLoop is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482003%2fhow-to-force-the-kernel-to-always-maintain-at-least-some-page-cache%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          uLoop is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          uLoop is a new contributor. Be nice, and check out our Code of Conduct.












          uLoop is a new contributor. Be nice, and check out our Code of Conduct.











          uLoop is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f482003%2fhow-to-force-the-kernel-to-always-maintain-at-least-some-page-cache%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

          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?