Btrfs Working On RAID1 Round-Robin Read Balancing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • phoronix
    Administrator
    • Jan 2007
    • 67050

    Btrfs Working On RAID1 Round-Robin Read Balancing

    Phoronix: Btrfs Working On RAID1 Round-Robin Read Balancing

    It's been a while since there has been anything new to report on the Btrfs file-system's built-in RAID functionality but that is changing with RAID1 round-robin read balancing...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite
  • bezirg
    Senior Member
    • May 2016
    • 156

    #2
    Wait, how did RAID1 work previously in btrfs?

    Comment

    • npwx
      Senior Member
      • Mar 2022
      • 130

      #3
      That seems like such a basic feature, I'm really surprised they did not have that yet.

      Comment

      • Ananace
        Phoronix Member
        • Feb 2016
        • 118

        #4
        Originally posted by bezirg View Post
        Wait, how did RAID1 work previously in btrfs?
        It wrote the data in duplicated stripes across the disks, and then it would read from one of the stripes, selected based on the pid of the reading process.
        With this change it can select stripes based on round-robin for reads instead.

        Comment

        • npwx
          Senior Member
          • Mar 2022
          • 130

          #5
          Originally posted by Ananace View Post

          It wrote the data in duplicated stripes across the disks, and then it would read from one of the stripes, selected based on the pid of the reading process.
          With this change it can select stripes based on round-robin for reads instead.
          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?

          Comment

          • woddy
            Senior Member
            • Feb 2023
            • 259

            #6
            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?
            ...or maybe it wasn't a priority for them.​

            Comment

            • microcode
              Senior Member
              • Mar 2013
              • 2345

              #7
              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?
              Rarely matters. They call it raid1 in the config for familiarity but it really is just mirroring. It is also a more complex thing on btrfs than on block device RAID (where the block addresses are the same for everything).

              Comment

              • waxhead
                Premium For Life
                • Jul 2014
                • 1137

                #8
                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?
                No. The pid based approach actually works quite well when there are many processes accessing the storage devices. This should work well for single processes depending on your hardware. There are far more interesting patches in the pipeline than the round robin method as well which takes into account how busy the devices are. Personality i ponder if not something like the principles of the EEVDF might be a good choice here as well.

                http://www.dirtcellar.net

                Comment

                • gotar
                  Senior Member
                  • Dec 2021
                  • 245

                  #9
                  Originally posted by waxhead View Post
                  The pid based approach actually works quite well when there are many processes accessing the storage devices.
                  At least at a time when RAID1 was limited to 2 devices (no 3+way mirroring) they used PID parity. So more processes could be reading from the same device ignoring entirely second one (of course with increasing number of processes the probability of this decreases, but it's obviously suboptimal).

                  And some people still believe this is production ready fs...

                  Comment

                  • pWe00Iri3e7Z9lHOX2Qx
                    Senior Member
                    • Jul 2020
                    • 1469

                    #10
                    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?
                    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.
                    Last edited by pWe00Iri3e7Z9lHOX2Qx; 15 December 2024, 11:23 AM.

                    Comment

                    Working...
                    X