You are not logged in.

#1 2021-12-31 00:02:12

OrakMoya
Member
Registered: 2019-09-22
Posts: 75

BTRFS RAID0 array poor and unexpected performance.

Hello,

Recently I got 2 additional 5400RPM HDD's, one 750GB, the other 640GB. I followed the BTRFS wiki to add more drives to an existing file system, my existing 7200RPM 2TB HDD . Despite the warning that RAID0 may not use all the space on differently-sized HDD, it appeared I still had the full 3.1TiB of storage. I ran a balance with metadata mirroring equal to RAID1 and data striping equal to RAID0, which took more than 8 hours. Now I want to benchmark and compare.

First problem, I don't know how to get an accurate R/W rate on a simple copy. I tried copying a large file from the RAID drive to my main NVMe SSD with Dolphin. Dolphin says files are copying at 130-200MiB/s, but the KDE System Monitor app reports 50MiB/s read rates. How come they are not the same? Also, that's a bit slow. My 4th 7200RPM 1TB drive can reach those speeds as well, and that thing isn't striping data across three drives. These are SATA 3 6Gb/s drives connected to SATA 3 ports.

I benchmarked the drives with the Gnome Disks app, and the 2TB drive that's now in RAID0 previously still got ~150MiB/s reads and writes, and the 1TB drive doing a bit better. I didn't keep the benchmarks of the slow drives, but they weren't too bad. IIRC a bit slower than the 2TB drive. I checked how the data is spread across the three drives with btrfs filesystem usage:

Data,RAID0: Size:1.50TiB, Used:1.09TiB (72.93%)
   /dev/sdb1     511.00GiB
   /dev/sdc      511.00GiB
   /dev/sdd      511.00GiB

So the data IS spread equally among the three drives, so how come I'm not getting read speeds equal to the sum of individual ones? I created a 5GiB file made of data from /dev/random with dd.  I copied the file to and from the drives with

 time sh -c 'cp /path/to/source /path/to/destination && sync' 

I got: From NVMe to RAID0: 43.8 seconds, so thats a 116.8MiB/s write. From NVME to 1TB disk: 32.2 seconds, 159MiB/s write

Then I used dd to copy the data from those random files to /dev/null, blocksize 1GB. From RAID0 to /dev/null, dd reported a 194MB/s read. From the 1TB HDD dd reported a 185MB/s read. That's not great. I expected better read speeds from the RAID array.

Am I doing something wrong? Is there some mount option I should be using? Should I have completely formatted the 3 RAID drives before combining them?

Offline

Board footer

Powered by FluxBB