Home | About the Storage Advisors | Adaptec Trusted Storage


RAID offload to multi-core x86 CPUs

Posted in Storage Interconnects & RAID, Advisor - Tom Treadway by Tom Treadway

Question to the Storage Advisors, from Curt: I have a question regarding RAID. With dual processor CPUs now common (e.g., Pentium D) wouldn’t a 4-drive RAID-5 array be faster than a 4-drive RAID-10 array? I would think the second core would (could?) be dedicated to parity calculations so even without a RAID card with dedicated parity processor a 4-disk RAID-5 array performance should be comparable to a 3-disk RAID-0 array. A 4-disk RAID-10 array should have performance comparable to a 2-disk RAID-0 array.

Curt, very good question. There’s a lot that can be said on this topic.

First, let’s compare performance of RAID levels and temporarily postpone the discussion of software RAID, i.e., RAID running on the host CPU(s).

A 4-drive RAID-5 and a 4-drive RAID-10 will have the same read performance, assuming that the host issues enough commands to keep all four drives busy. Each drive will be able to respond to one host command.

Writes are a different story. A short write to a RAID-5 will result in two disk reads (on different drives), a few XORs (which are relatively fast compared to the disk accesses), a full rotation on each of those two disks, and two disk writes. Alternately, the RAID-10 will have two disk writes. So RAID-10 has half the number of IOs, so you might think it would be twice as fast as RAID-5, but RAID-10 is actually much, much faster due to the XORs and full rotations on RAID-5

So now let’s look at what would happen if the RAID-5 XOR was offloaded to a CPU. XOR in hardware runs at full memory bandwidths, or hundreds of MB/s. XOR in software can’t actually be any faster. Plus, as seen earlier, most of the performance impact of RAID-5 is due to the disk IOs, not the XOR. Therefore moving the XOR to the host CPU really won’t make much of a difference. I suppose it would save the XOR hardware being implemented in hardware, but that’s a pretty minor piece of circuitry, and plus it’s already been designed-in.

Another point is that RAID-5 is becoming “yesterday’s technology”. Due to high bit-error rates (BER) on today’s HUGE new drives, it’s very important to start using RAID-6 which protects against dual drive failure. Unfortunately the calculation complexity of RAID-6 is so large that it is difficult to implement on a powerful host x86 CPU and still get reasonable performance.

So here’s the question that you didn’t ask: Could the entire RAID stack be moved to the host CPU? Performance may suffer, but cost would be reduced.

Well, such software stacks already exist today – such as Linux’s md RAID. But software RAID is rarely taken seriously due to various issues, including lack of battery-backed cache.

However it’s a shame to waste all these additional cores from Intel and AMD, so rest assured that there are some smart people looking at these issues. I’ll probably be able to post more details in a few months.

Thanks,
TT

Leave a Reply