RAID5 vs Raid10
Performance Benchmark MDADM
/ Von /
Comment and Investigation in RAID Performance
RAID 5 vs RAID10 has been discussed for ages; its common knowledge that RAID10 offers better performance - but how much depends on the actual implementation and hardware.
I just got a Server with 4 x 10TB of disks, all brand new, and decided to give it a small benchmark. Note that this is only a sequential write and read benchmark; on random writes, the results will vary.
The single drive performance is ~250 MB/s read and write.
Raid 10 Write:
# dd if=/dev/zero of=/dev/md0 bs=10M count=500 oflag=direct 500+0 records in 500+0 records out 5242880000 bytes (5.2 GB, 4.9 GiB) copied, 11.5464 s, 454 MB/s
Raid 10 Read:
# echo 3 > /proc/sys/vm/drop_caches # dd if=/dev/md0 of=/dev/null bs=10M count=1000 1000+0 records in 1000+0 records out 10485760000 bytes (10 GB, 9.8 GiB) copied, 22.9516 s, 457 MB/s
Raid 5 Write:
# dd if=/dev/zero of=/dev/md0 bs=10M count=1000 oflag=direct 1000+0 records in 1000+0 records out 10485760000 bytes (10 GB, 9.8 GiB) copied, 26.8037 s, 391 MB/s
Raid 5 Read:
# echo 3 > /proc/sys/vm/drop_caches # dd if=/dev/md0 of=/dev/null bs=10M count=1000 1000+0 records in 1000+0 records out 10485760000 bytes (10 GB, 9.8 GiB) copied, 14.9192 s, 703 MB/s
The results are Interesting; RAID10 has +16% on write but -34% on read performance compared to RAID5. Raid5 also offers 33% more usable storage.
In RAID10, data has to be written twice, but can be striped over two devices. if one drive can write around 250 MB/s you get twice that speed. In my benchmark, this is not the exact number i see, but it is close. Same goes for writing.
In RAID5, data has also to be written twice, one original and one parity; the original can be striped over 3 drives, but the parity needs to be calculated and written to one drive. Im not so deep into mdadm that i could explain what exactly happens on my sequential write benchmark here.
When it comes to reading, Raid5 acts like a RAID0, as it does not need to read the parity but only the striped data over three drives, so it comes close to 3x single drive performance, what we are seeing above.
As im using this server as a write-once archive server, so going with raid5 is fine for me.