[kwlug-disc] MDADM and RAID

John Van Ostrand john at netdirect.ca
Wed Mar 3 10:07:48 EST 2010


Further to that testing I just did, the real, sys and user numbers reported by the time command are interesting:

When writing through software RAID 5:

    real	0m36.993s
    user	0m0.003s
    sys 	0m14.743s

When writing through software RAID 0+1:

    real	0m10.222s
    user	0m0.005s
    sys 	0m6.838s

RAID 5 kept one core 40% busy during the write. Some of this time would have been moving data around and others would have been calculating parity.

RAID 0+1, on the other hand, used 67% of a core, presumably just pushing data around, but for a much shorter time.

In the end though, RAID 0+1, was able to do the work faster and with only 46% of the CPU required for RAID 5.

My reasoning on the difference is this: RAID 5 has to read the stripe of data from the disk first, then insert it's own data and recalculate parity. Since this involves reading a stripe of data before writing it out it actually is moving 6 times the data. Being that it is a little more than double the I/O, the CPU part of calculating parity would be about 1.1 seconds for the 5.2GB.







More information about the kwlug-disc mailing list