Do I need to run 'btrfs balance' occasionally if I have RAID1 btrfs?

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











up vote
1
down vote

favorite
1












I have two devices setup as RAID1 which I assume data (and metadata) will always mirror on both.



$ sudo btrfs filesystem show 
Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
Total devices 2 FS bytes used 751.55GiB
devid 1 size 931.51GiB used 763.03GiB path /dev/sda
devid 2 size 931.51GiB used 763.03GiB path /dev/sdb

$ sudo btrfs filesystem df /
Data, RAID1: total=758.00GiB, used=748.13GiB
System, RAID1: total=32.00MiB, used=144.00KiB
Metadata, RAID1: total=5.00GiB, used=3.42GiB
GlobalReserve, single: total=512.00MiB, used=0.00B


Do I need to run btrfs balance on this setup?



If yes, how often?







share|improve this question
























    up vote
    1
    down vote

    favorite
    1












    I have two devices setup as RAID1 which I assume data (and metadata) will always mirror on both.



    $ sudo btrfs filesystem show 
    Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
    Total devices 2 FS bytes used 751.55GiB
    devid 1 size 931.51GiB used 763.03GiB path /dev/sda
    devid 2 size 931.51GiB used 763.03GiB path /dev/sdb

    $ sudo btrfs filesystem df /
    Data, RAID1: total=758.00GiB, used=748.13GiB
    System, RAID1: total=32.00MiB, used=144.00KiB
    Metadata, RAID1: total=5.00GiB, used=3.42GiB
    GlobalReserve, single: total=512.00MiB, used=0.00B


    Do I need to run btrfs balance on this setup?



    If yes, how often?







    share|improve this question






















      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      I have two devices setup as RAID1 which I assume data (and metadata) will always mirror on both.



      $ sudo btrfs filesystem show 
      Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
      Total devices 2 FS bytes used 751.55GiB
      devid 1 size 931.51GiB used 763.03GiB path /dev/sda
      devid 2 size 931.51GiB used 763.03GiB path /dev/sdb

      $ sudo btrfs filesystem df /
      Data, RAID1: total=758.00GiB, used=748.13GiB
      System, RAID1: total=32.00MiB, used=144.00KiB
      Metadata, RAID1: total=5.00GiB, used=3.42GiB
      GlobalReserve, single: total=512.00MiB, used=0.00B


      Do I need to run btrfs balance on this setup?



      If yes, how often?







      share|improve this question












      I have two devices setup as RAID1 which I assume data (and metadata) will always mirror on both.



      $ sudo btrfs filesystem show 
      Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
      Total devices 2 FS bytes used 751.55GiB
      devid 1 size 931.51GiB used 763.03GiB path /dev/sda
      devid 2 size 931.51GiB used 763.03GiB path /dev/sdb

      $ sudo btrfs filesystem df /
      Data, RAID1: total=758.00GiB, used=748.13GiB
      System, RAID1: total=32.00MiB, used=144.00KiB
      Metadata, RAID1: total=5.00GiB, used=3.42GiB
      GlobalReserve, single: total=512.00MiB, used=0.00B


      Do I need to run btrfs balance on this setup?



      If yes, how often?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 7 '17 at 10:55









      wizzup

      21917




      21917




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote













          While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:



          1. That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.


          2. If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:



            btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16


            This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.







          share|improve this answer



























            up vote
            1
            down vote













            Quoted verbatim from the BTRFS FAQ:




            Do I need to run a balance regularly?



            In general usage, no. A full unfiltered balance typically takes a long
            time, and will rewrite huge amounts of data unnecessarily. You may
            wish to run a balance on metadata only (see Balance_Filters) if you
            find you have very large amounts of metadata space allocated but
            unused
            , but this should be a last resort. At some point, this kind of
            clean-up will be made an automatic background process. -
            https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F




            TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.






            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: 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%2f409446%2fdo-i-need-to-run-btrfs-balance-occasionally-if-i-have-raid1-btrfs%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              3
              down vote













              While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:



              1. That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.


              2. If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:



                btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16


                This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.







              share|improve this answer
























                up vote
                3
                down vote













                While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:



                1. That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.


                2. If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:



                  btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16


                  This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.







                share|improve this answer






















                  up vote
                  3
                  down vote










                  up vote
                  3
                  down vote









                  While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:



                  1. That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.


                  2. If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:



                    btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16


                    This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.







                  share|improve this answer












                  While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:



                  1. That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.


                  2. If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:



                    btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16


                    This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 7 '17 at 20:24









                  Austin Hemmelgarn

                  5,1641915




                  5,1641915






















                      up vote
                      1
                      down vote













                      Quoted verbatim from the BTRFS FAQ:




                      Do I need to run a balance regularly?



                      In general usage, no. A full unfiltered balance typically takes a long
                      time, and will rewrite huge amounts of data unnecessarily. You may
                      wish to run a balance on metadata only (see Balance_Filters) if you
                      find you have very large amounts of metadata space allocated but
                      unused
                      , but this should be a last resort. At some point, this kind of
                      clean-up will be made an automatic background process. -
                      https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F




                      TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.






                      share|improve this answer
























                        up vote
                        1
                        down vote













                        Quoted verbatim from the BTRFS FAQ:




                        Do I need to run a balance regularly?



                        In general usage, no. A full unfiltered balance typically takes a long
                        time, and will rewrite huge amounts of data unnecessarily. You may
                        wish to run a balance on metadata only (see Balance_Filters) if you
                        find you have very large amounts of metadata space allocated but
                        unused
                        , but this should be a last resort. At some point, this kind of
                        clean-up will be made an automatic background process. -
                        https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F




                        TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.






                        share|improve this answer






















                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          Quoted verbatim from the BTRFS FAQ:




                          Do I need to run a balance regularly?



                          In general usage, no. A full unfiltered balance typically takes a long
                          time, and will rewrite huge amounts of data unnecessarily. You may
                          wish to run a balance on metadata only (see Balance_Filters) if you
                          find you have very large amounts of metadata space allocated but
                          unused
                          , but this should be a last resort. At some point, this kind of
                          clean-up will be made an automatic background process. -
                          https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F




                          TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.






                          share|improve this answer












                          Quoted verbatim from the BTRFS FAQ:




                          Do I need to run a balance regularly?



                          In general usage, no. A full unfiltered balance typically takes a long
                          time, and will rewrite huge amounts of data unnecessarily. You may
                          wish to run a balance on metadata only (see Balance_Filters) if you
                          find you have very large amounts of metadata space allocated but
                          unused
                          , but this should be a last resort. At some point, this kind of
                          clean-up will be made an automatic background process. -
                          https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F




                          TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 7 '17 at 17:39









                          Emmanuel Rosa

                          2,2651410




                          2,2651410



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409446%2fdo-i-need-to-run-btrfs-balance-occasionally-if-i-have-raid1-btrfs%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?