Btrfs Working On RAID1 Round-Robin Read Balancing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Britoid
    Senior Member
    • Jul 2013
    • 2173

    #11
    Originally posted by npwx View Post

    So it left all the read performance benefits of RAID1 unused under the table. Given the age of btrfs, this leaves me baffled. I can see plenty of micro optimizations over time, yet this big one took what, 10, 15 years?
    RAID in BTRFS also works very differently to standard raid. The disks are not identical, you can't just read the same location on a second drive.

    Comment

    • Britoid
      Senior Member
      • Jul 2013
      • 2173

      #12
      Originally posted by pWe00Iri3e7Z9lHOX2Qx View Post

      Btrfs should never have used the term "RAID", because those levels actually mean something to most people. The write or in this case read strategies are often different than what you would assume based on the RAID level. Like the write strategy for RAID 10 reordering disks meaning you are basically guaranteed to lose data when any 2nd disk fails, compared to a traditional RAID 10 where you are only screwed if the 2nd failed disk is from the same mirror. So you go from a 33% chance of losing data in a traditional four disk RAID 10 second failed disk scenario to a 100% chance with Btrfs RAID 10. And this isn't obvious from the documentation. Fun right?

      Btrfs is designed to be as flexible as possible with maximizing storage / mixing disks / changing "RAID" levels. That can be great if that's the most important thing to you. But there are a slew of reasons that many people put up with the PITA that comes with out of tree modules and use ZFS.
      With BTRFS unless you care about bonus performance, using raid 1 with 4 drives will give you the same disk space as raid 10 and higher chance of not loosing data if two drives fail.

      Comment

      • Serafean
        Senior Member
        • Dec 2011
        • 614

        #13
        Originally posted by pWe00Iri3e7Z9lHOX2Qx View Post

        Btrfs should never have used the term "RAID", because those levels actually mean something to most people. The write or in this case read strategies are often different than what you would assume based on the RAID level. Like the write strategy for RAID 10 reordering disks meaning you are basically guaranteed to lose data when any 2nd disk fails, compared to a traditional RAID 10 where you are only screwed if the 2nd failed disk is from the same mirror. So you go from a 33% chance of losing data in a traditional four disk RAID 10 second failed disk scenario to a 100% chance with Btrfs RAID 10. And this isn't obvious from the documentation. Fun right?
        .
        I'd say in typical risk management, a 33% chance is still considered as being screwed if the situation arises, so going 100% chance doesn't seem to be a bad tradeoff for more flexibility.

        Comment

        • pWe00Iri3e7Z9lHOX2Qx
          Senior Member
          • Jul 2020
          • 1596

          #14
          Originally posted by Serafean View Post

          I'd say in typical risk management, a 33% chance is still considered as being screwed if the situation arises, so going 100% chance doesn't seem to be a bad tradeoff for more flexibility.
          LOL. Sure. RAID 10 is widely used because of its mix of performance and redundancy. You can guess which way the numbers go as you add more drives.

          Comment

          • npwx
            Senior Member
            • Mar 2022
            • 138

            #15
            Originally posted by waxhead View Post

            No. The pid based approach actually works quite well when there are many processes accessing the storage devices.
            That makes sense, thanks for the explanation.

            Comment

            • cynic
              Senior Member
              • Oct 2011
              • 1091

              #16
              Originally posted by pWe00Iri3e7Z9lHOX2Qx View Post
              So you go from a 33% chance of losing data in a traditional four disk RAID 10 second failed disk scenario to a 100% chance with Btrfs RAID 10. And this isn't obvious from the documentation. Fun right?
              RAID is not intended for avoiding losing data. The tool for that purpouse is backup.
              Anyway btrfs is much better than "classical" RAID when it comes to preventing losing data.

              In a normal RAID1 (or 10), If one of the copies of the data gets corrupted, the data is lost​ (because you cannot tell which copy is the the good one).
              In btrfs, being it checksummed, you can detect and fix the corrupted copy.

              With a classic raid 1 you have double the chance of data corruption compared to a single device.

              Comment

              • bezirg
                Senior Member
                • May 2016
                • 158

                #17
                Originally posted by Britoid View Post

                With BTRFS unless you care about bonus performance, using raid 1 with 4 drives will give you the same disk space as raid 10 and higher chance of not loosing data if two drives fail.
                How can RAID1 give you same disk space as RAID10?

                Comment

                • bezirg
                  Senior Member
                  • May 2016
                  • 158

                  #18
                  I assume this experimental patch would also apply to Btrfs RAID10 mode?

                  Comment

                  • cynic
                    Senior Member
                    • Oct 2011
                    • 1091

                    #19
                    Originally posted by bezirg View Post

                    How can RAID1 give you same disk space as RAID10?
                    if you have 4 drives in btrfs you can configure them in raid10 or raid1.
                    Since the redundacy level is always 2 copies, you get the same space.

                    Comment

                    • bezirg
                      Senior Member
                      • May 2016
                      • 158

                      #20
                      Originally posted by cynic View Post

                      if you have 4 drives in btrfs you can configure them in raid10 or raid1.
                      Since the redundacy level is always 2 copies, you get the same space.
                      I didn't know, thank you.

                      Comment

                      Working...
                      X