I have a use-case that is dominated by large sequential writes. Seems to me that striped RAID5 performance for large writes should approach the performance of striped RAID0.
Say you configured RAID5 with 1MB stripes across 4 drives. An aligned 3MB write should light up all four drives (one stripe per drive + one drive for parity).
Given a volume group
vg-flash with 4 SATA SSDs, for comparison allocate and measure a linear, striped (RAID0) and RAID5 volumes:
# lvcreate --size=50G --name lv-linear vg-flash # lvcreate --type raid0 --stripes 3 --stripesize=1M --size=50G --name lv-raid0 vg-flash # lvcreate --type raid5 --stripes 3 --stripesize=1M --size=50G --name lv-raid5 vg-flash
(Note that you have to wait for the read-scan of the RAID5 volume to complete.)
Timing the linear volume gives the expected result for a SATA SSD:
# time dd if=/dev/zero of=/dev/vg-flash/lv-linear bs=30M count=1000 oflag=direct 1000+0 records in 1000+0 records out 31457280000 bytes (31 GB, 29 GiB) copied, 67.4679 s, 466 MB/s real 1m7.475s user 0m0.017s sys 0m9.725s
Timing the striped (RAID0) volume gives near 3x the rate of the linear volume, as expected:
# time dd if=/dev/zero of=/dev/vg-flash/lv-raid0 bs=30M count=1000 oflag=direct 1000+0 records in 1000+0 records out 31457280000 bytes (31 GB, 29 GiB) copied, 27.4861 s, 1.1 GB/s real 0m27.492s user 0m0.020s sys 0m9.537s
time is arguably redundant. Also note this is using the Intel SATA controller. Some 3rd party SATA controllers are slower. Also expected this to be a lot closer to actual 3x rate.)
Timing the RAID5 volume gives roughly the same rate as an individual drive.
# time dd if=/dev/zero of=/dev/vg-flash/lv-raid5 bs=30M count=1000 oflag=direct 1000+0 records in 1000+0 records out 31457280000 bytes (31 GB, 29 GiB) copied, 64.5604 s, 487 MB/s real 1m4.567s user 0m0.027s sys 0m13.098s
There is an itch in back of mind, saying that I am missing an option. Perhaps I am mistaken.
Is there a means to get parallel writes across all the drives in a RAID?
(With some actual redundancy, so that excludes RAID0.)