Thursday, July 6, 2017

raid - RAID1 write penalty using mdadm - what's the cause?

When doing some performance tests writing to a SSD-based 3-way RAID 1 mirror powered by mdadm, it appears we suffer a significant write penalty of about 2.2x slower than doing the same test on just one individual drive. We're reading from and writing to the same underlying physical drives in this test because that simulates our real world test case we're interested in.



Is this slowdown due to SATA III speed limitations or something else? I'm surprised RAID 1 would have a write penalty because I'd think it could write to all three drives simultaneously at the same speed it could write to one of them.



All three drives present:
dd if=/dev/md3 of=test.file bs=1048576 count=37193
...207.748 s, 188 MB/s


Just two drives present (i.e. normal two-drive RAID 1)
dd if=/dev/zero of=test.file bs=1048576 count=37193
...119.016 s, 328 MB/s

Just one drive present (no redundancy)
dd if=/dev/zero of=test.file bs=1048576 count=37193
...93.794 s, 416 MB/s

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...