After increasing chunksize in an LVM cache, files are no longer promoted to the cache











up vote
1
down vote

favorite












After running into issues with running out of kernel memory, I increased the chunksize of my lvmcache from the default (which I believe was 64k) to a much higher 8M.



After this change, blocks do not seem to be promoted to the cache, despite constant use with both reads and writes. The meta cache is being used however (at a roughly similar rate to before the chunksize change).
The cache was created in writeback mode.



media-media: 0 46883430400 cache 8 277/2621440 16384 0/56320 0 2903157 0 1259187 0 0 0 1 writeback 2 migration_threshold 2048 smq 0 rw -


Is there a way to investigate why blocks are not being promoted? I understand this large chunk size will likely be a lot less efficient in the general case, but surely some blocks should be promoted?










share|improve this question


























    up vote
    1
    down vote

    favorite












    After running into issues with running out of kernel memory, I increased the chunksize of my lvmcache from the default (which I believe was 64k) to a much higher 8M.



    After this change, blocks do not seem to be promoted to the cache, despite constant use with both reads and writes. The meta cache is being used however (at a roughly similar rate to before the chunksize change).
    The cache was created in writeback mode.



    media-media: 0 46883430400 cache 8 277/2621440 16384 0/56320 0 2903157 0 1259187 0 0 0 1 writeback 2 migration_threshold 2048 smq 0 rw -


    Is there a way to investigate why blocks are not being promoted? I understand this large chunk size will likely be a lot less efficient in the general case, but surely some blocks should be promoted?










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      After running into issues with running out of kernel memory, I increased the chunksize of my lvmcache from the default (which I believe was 64k) to a much higher 8M.



      After this change, blocks do not seem to be promoted to the cache, despite constant use with both reads and writes. The meta cache is being used however (at a roughly similar rate to before the chunksize change).
      The cache was created in writeback mode.



      media-media: 0 46883430400 cache 8 277/2621440 16384 0/56320 0 2903157 0 1259187 0 0 0 1 writeback 2 migration_threshold 2048 smq 0 rw -


      Is there a way to investigate why blocks are not being promoted? I understand this large chunk size will likely be a lot less efficient in the general case, but surely some blocks should be promoted?










      share|improve this question













      After running into issues with running out of kernel memory, I increased the chunksize of my lvmcache from the default (which I believe was 64k) to a much higher 8M.



      After this change, blocks do not seem to be promoted to the cache, despite constant use with both reads and writes. The meta cache is being used however (at a roughly similar rate to before the chunksize change).
      The cache was created in writeback mode.



      media-media: 0 46883430400 cache 8 277/2621440 16384 0/56320 0 2903157 0 1259187 0 0 0 1 writeback 2 migration_threshold 2048 smq 0 rw -


      Is there a way to investigate why blocks are not being promoted? I understand this large chunk size will likely be a lot less efficient in the general case, but surely some blocks should be promoted?







      linux lvm cache device-mapper






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 5 '17 at 14:40









      ss23

      217




      217






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Sorry for digging graves, but I happens to find a similar problem.



          It seems the LVM cache has problem with cache chunk size larger than 1M.
          (https://marc.info/?l=linux-lvm&m=152948734523317&w=2)



          In my case the chunk size is 1.06M, which was determined by the lvcreate command automatically.
          The cache was created in writethrough mode. Then I changed it to writeback, the block promotes; but when I try to flush the cache, the dirty blocks cannot be written to the disk.



          I have to destroy the whole LV, since the cache cannot be split safely. Recreate the cachepool with --chunksize=512k and the cache flushing works.
          Are you still using LVM cache? What's your current cache chunk size?






          share|improve this answer










          New contributor




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


















          • I never found a solution so have migrated away from lvm based caching. Tweaking my chunk size manually got it caching again, but it was a bit of a black-box, so not something I wanted to continue using.
            – ss23
            2 days ago











          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%2f384136%2fafter-increasing-chunksize-in-an-lvm-cache-files-are-no-longer-promoted-to-the%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













          Sorry for digging graves, but I happens to find a similar problem.



          It seems the LVM cache has problem with cache chunk size larger than 1M.
          (https://marc.info/?l=linux-lvm&m=152948734523317&w=2)



          In my case the chunk size is 1.06M, which was determined by the lvcreate command automatically.
          The cache was created in writethrough mode. Then I changed it to writeback, the block promotes; but when I try to flush the cache, the dirty blocks cannot be written to the disk.



          I have to destroy the whole LV, since the cache cannot be split safely. Recreate the cachepool with --chunksize=512k and the cache flushing works.
          Are you still using LVM cache? What's your current cache chunk size?






          share|improve this answer










          New contributor




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


















          • I never found a solution so have migrated away from lvm based caching. Tweaking my chunk size manually got it caching again, but it was a bit of a black-box, so not something I wanted to continue using.
            – ss23
            2 days ago















          up vote
          0
          down vote













          Sorry for digging graves, but I happens to find a similar problem.



          It seems the LVM cache has problem with cache chunk size larger than 1M.
          (https://marc.info/?l=linux-lvm&m=152948734523317&w=2)



          In my case the chunk size is 1.06M, which was determined by the lvcreate command automatically.
          The cache was created in writethrough mode. Then I changed it to writeback, the block promotes; but when I try to flush the cache, the dirty blocks cannot be written to the disk.



          I have to destroy the whole LV, since the cache cannot be split safely. Recreate the cachepool with --chunksize=512k and the cache flushing works.
          Are you still using LVM cache? What's your current cache chunk size?






          share|improve this answer










          New contributor




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


















          • I never found a solution so have migrated away from lvm based caching. Tweaking my chunk size manually got it caching again, but it was a bit of a black-box, so not something I wanted to continue using.
            – ss23
            2 days ago













          up vote
          0
          down vote










          up vote
          0
          down vote









          Sorry for digging graves, but I happens to find a similar problem.



          It seems the LVM cache has problem with cache chunk size larger than 1M.
          (https://marc.info/?l=linux-lvm&m=152948734523317&w=2)



          In my case the chunk size is 1.06M, which was determined by the lvcreate command automatically.
          The cache was created in writethrough mode. Then I changed it to writeback, the block promotes; but when I try to flush the cache, the dirty blocks cannot be written to the disk.



          I have to destroy the whole LV, since the cache cannot be split safely. Recreate the cachepool with --chunksize=512k and the cache flushing works.
          Are you still using LVM cache? What's your current cache chunk size?






          share|improve this answer










          New contributor




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









          Sorry for digging graves, but I happens to find a similar problem.



          It seems the LVM cache has problem with cache chunk size larger than 1M.
          (https://marc.info/?l=linux-lvm&m=152948734523317&w=2)



          In my case the chunk size is 1.06M, which was determined by the lvcreate command automatically.
          The cache was created in writethrough mode. Then I changed it to writeback, the block promotes; but when I try to flush the cache, the dirty blocks cannot be written to the disk.



          I have to destroy the whole LV, since the cache cannot be split safely. Recreate the cachepool with --chunksize=512k and the cache flushing works.
          Are you still using LVM cache? What's your current cache chunk size?







          share|improve this answer










          New contributor




          Mike Chen 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 answer



          share|improve this answer








          edited Nov 29 at 21:20





















          New contributor




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









          answered Nov 29 at 19:40









          Mike Chen

          11




          11




          New contributor




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





          New contributor





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






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












          • I never found a solution so have migrated away from lvm based caching. Tweaking my chunk size manually got it caching again, but it was a bit of a black-box, so not something I wanted to continue using.
            – ss23
            2 days ago


















          • I never found a solution so have migrated away from lvm based caching. Tweaking my chunk size manually got it caching again, but it was a bit of a black-box, so not something I wanted to continue using.
            – ss23
            2 days ago
















          I never found a solution so have migrated away from lvm based caching. Tweaking my chunk size manually got it caching again, but it was a bit of a black-box, so not something I wanted to continue using.
          – ss23
          2 days ago




          I never found a solution so have migrated away from lvm based caching. Tweaking my chunk size manually got it caching again, but it was a bit of a black-box, so not something I wanted to continue using.
          – ss23
          2 days ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f384136%2fafter-increasing-chunksize-in-an-lvm-cache-files-are-no-longer-promoted-to-the%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

          Accessing regular linux commands in Huawei's Dopra Linux

          Can't connect RFCOMM socket: Host is down

          Kernel panic - not syncing: Fatal Exception in Interrupt