Btrfs Gets A RAID1/10 Speed Patch, Helping Out SSDs
Written by Michael Larabel in Linux Storage on 27 December 2017 at 06:38 PM EST. 7 Comments
LINUX STORAGE --
A new Btrfs file-system kernel driver patch is now available to improve its RAID1/RAID10 read performance, particularly for SSDs.

In our Btrfs RAID benchmarks even recently the results haven't been the most compelling against say EXT4 with MD RAID, but for at least RAID 1 and 10 levels it looks like some read improvements could be on the way.

Phoronix reader "waxhead" pointed out this new patch. The patch description sums it up concisely:
Currently btrfs raid1/10 balancer [balance] requests to mirrors, based on pid % num of mirrors.

Update logic and make it understood if [underlying] device [is] non rotational.

If one of mirrors are non rotational, then all read requests will be moved to non rotational device.

If both of mirrors are non rotational, calculate sum of pending and in flight request for queue on that bdev and use device with least queue [length].

P.S. Inspired by md-raid1 read balancing
So basically for Btrfs RAID1/10 reads, it would prefer SSDs over rotational storage devices but otherwise would now determine the shortest queue of other storage devices to read from. At the moment though Btrfs RAID makes no determination of the fastest RAID device for its writes.

It will be interesting to see if this work is further tuned and makes it into an upcoming kernel release (Linux 4.16+).

About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related Linux Storage News
Popular News This Week