Announcement

Collapse
No announcement yet.

4-Disk Btrfs Native RAID Performance On Linux 4.10

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by starshipeleven View Post
    RAID1 should theoretically have same read speed as RAID0 as it's reading from both drives at the same time.
    Oh, yeah, correct. It's probably a feature lacking as you said then.

    Comment


    • #12
      Originally posted by pal666 View Post
      if you need btrfs features then you have no choice. if you don't need them then you don't need btrfs
      thanks a lot to everyone.

      Comment


      • #13
        Originally posted by starshipeleven View Post
        RAID1 should theoretically have same read speed as RAID0 as it's reading from both drives at the same time.
        This was the point of my post: 2-disk RAID-10 (RAID-1E) using the 'far' layout effectively distributes blocks sequentially (ABABABAB ...) between disks for the first half of each disk. The mirrored stripes are then written to the second half of each disk sequentially (BABABABA ...).

        With rotating storage, this makes reads faster (as they can be striped like in RAID-0 from the first half of both disks), but writes become much slower due to having to seek and move the head across half the disk.

        With SSDs, the physical layout gives you no write+seek penalty, so you get RAID-0 read speeds and up to RAID-0 write speeds (because writes are striped and can happen in parallel).

        The same holds true for 4-disk RAID-10 -- you get the same read speeds as a 4-disk RAID-0 and up to 4-disk RAID-0 write speeds.

        Thus, this is a simple way to make use of all those old 120-128 GB SSDs that people are retiring -- just slap 4 of them in a 250-ish GB RAID-10 using the far layout and you have a pretty speedy disk subsystem that theoretically allows you to have up to 4x500 MB/s = 2 GB/s read speeds for not a lot of money.

        EDIT: @Zucca: My mistake. I somehow managed to misread the article (as if Michael was using btfrs on top of mdadm raid, which is clearly not the case). Eek.
        Last edited by ermo; 29 January 2017, 05:58 PM.

        Comment


        • #14
          I don't think you can do RAID-1E on btrfs.

          Also for those who wonder btrfs RAID-1 speed: RAID-1 in btrfs is basically all disks smashed together as one JBOD and then split into two with mirroring. So theorically you'd get maximum of 2x disk speed from btrfs RAID-1 no matter how many disks you have in the pool. At least that's how I've understood it. Anyone is welcome to correct me if I'm wrong.
          It's a common feature request (I asked this from the offical IRC channel and got the answer: "no, but frequently asked for") to be able to have more redundancy levels with btrfs RAID-1 then just simple two-way mirroring.

          Comment


          • #15
            RAID1 has the theoretical reading performance of 2 drives but the write performance of 1, since the drives are mirrored. I'm sure some in some cases there is no performance improvement when reading from RAID1 - I'm sure it all depends on the controller. But as ermo stated, seek times have a big impact on all of this too.

            Comment


            • #16
              Originally posted by Charlie68 View Post
              I would understand if an SSD is better to use ext4 or Btrfs for Ubuntu. What do you advise?
              I would think that CoW filesystems (btrfs, f2fs) are much preferable to journaling ones (ext4, xfs & co) on SSDs.

              Comment


              • #17
                Seems (4 disk-) RAID5 is the RIGHT THING for this FS.
                No, RAID0 is NO option for servers.
                Last edited by nuetzel; 29 January 2017, 05:09 PM.

                Comment


                • #18
                  Wait, did they already fix the raid 5/6 issues?

                  Comment


                  • #19
                    Originally posted by jacob View Post

                    I would think that CoW filesystems (btrfs, f2fs) are much preferable to journaling ones (ext4, xfs & co) on SSDs.
                    That’s an interesting comment, considering that underlying SSD implementations most likely behave like a log-structured filesystem (i.e. nothing but journal).

                    Comment


                    • #20
                      There seems to be some confusion to what BTRFS' *native* RAID actually is.... and just for the record BTRFS RAID is no the same as MD Raid or any other hardware raid for that matter. So allow me to explain (a bit simple) what modes BTRFS support support and how they work. Let's pretend you have 4 disks in a pool , all part of a single filesystem.

                      SINGLE:
                      Will keep ONE copy of the data on ANY disk regardless of how many disks that exist in the pool.

                      DUP:
                      Will keep TWO copies of the data on THE SAME disk, regardless of how many disks that exists in the pool

                      RAID0
                      Will spread the data over ALL disks in the pool. So for simplicity sake: Think of this as having a 4 MB file, 1MB will be stored per disk.

                      RAID1:
                      Will keep TWO copies of the data on DIFFERENT disks (you can loose one disk), regardless of how many disks that exists in the pool.

                      RAID10:
                      Will spread the data over HALF the number of disks in the pool, and duplicate it e.g. keep a copy on the other half of the disks that exist in the pool.

                      RAID5:
                      Will spread the data over ALL the disks in the pool, however 1/4th of the total space (4 disks remember) is used for special data called parity that can be used to reconstruct any of the data on the other disks. If the parity is lost it can simply recalculate the parity from the working disks. And since BTRFS does checksum it can know if the data is reliable before reconstructing parity / lost data. You can loose one disk and still reconstruct data.

                      RAID6:
                      Same as RAID5. but will use 2/4th of the total space (again 4 disks remember) for this special data called parity. This means you can loose two disks and still reconstruct data.

                      Word of advice: Raid5/6 in BTRFS is a brilliant way to test your backups. In other words it is NOT production ready and marked as UNSTABLE right now.
                      BTRFS allows different profiles on data and metadata (data about data).

                      In BTRFS terms the usage of the RAID name is a bit wrong since the redundancy is basically a mix of copies, stripes and parities.

                      http://www.dirtcellar.net

                      Comment

                      Working...
                      X