> AFAIK: RAID-5 accesses are always in stripes. All disks are read (or
> written) no matter how small the original read/write request. Whereas, RAID0
> can read just one disk for smaller requests. RAID5 does a lot more work for
> smaller requests.
>
Why always whole stripes? This seems unnecessary to me, both for reading
and writing. Not doing unnecessary access frees the other drives
up so other small accesses may be done simultaneously.
Small reads are trivial, just read the requested and no more.
Writing (including the parity update) may also be done without
writing a whole stripe. It goes like this:
1. Read the disk block about to be overwritten, if it isn't in cache already.
2. Also get the corresponding parity block.
3. xor the information to be overwritten with the parity data. This
calculation removes the old stuff from the parity data.
4. xor the new information with the parity data. Now the parity is correct.
5. Write the new data and the new parity to disk.
So, two reads and two writes for a small write. No matter how
many drives used for the array.
Reading whole stripes may give a readahead benefit.
I cannot see why whole stripes are used for small writes though. Delaying
small writes in a buffer may be a good idea, as that could decrease
the number of parity updates. But if the buffer fills up/times out,
consider the above algorithm, unless I am missing
something important.
Helge Hafting