> Alec.Cawley@stripped wrote:
> > I do not think it is true that mirroring gives no performance benefit
> > well implemented controller). For reads, the raid controller can read
> > either copy of the data, so that effectively two reads can be in
> > at the same time, doubling read performance.
> Yes, doubling read performance (best case) when compared with a non-RAID
> system. But with RAID5, you have more disks and can therefore read more
> just two disks simultaneously. The more spindles you have, the better
I was assuming that your number of spindles was set by your need to store
daya. If this is so, the number of primary data drives, and hence spindles,
is fixed. It is noly whtehr you have one parity drive, or N mirror drives.
The latter is, of course, more expensive for a given storage capacity - but
gives you higer performance for your money.
> > On the write side, for small
> > writes a raid 5 has to read the overwritten data (in order to remove it
> > from the parity) then do a read/modify/write on the parity.
> I don't quite understand the need to read data before any write. Why
> it just calculate the parity of whatever is being written and just write
> disk? Wouldn't there be slack space, as with any disk system? Write a 1
> file and it uses an N byte block on one disk, plus an N byte parity block
Call the disks A, B, C, D, P. For some sector we are about to overwrite A
with A'. The current contents of P are A^B^C^D (^ used for XOR). The final
contents of P must be A'^B^C^D. We can read B, D and D to produce this
valure ab initio. However, it is more efficient to read A and P, XOR them
to produce B^C^D then XOR in the new data A'. In this case, both A and P
must do read followed by write. Since this involves a full rotation between
the read and the write, this is a relatively slow operation. This does not
occur if we are overwrting all of A, B, C, and D because *in this case* we
can do as you expect and calculate P on the fly.
> > Performance
> > again should be doubled (two writes on the mirrored system,
> > and read/modify/write on the Raid5 system, with the two halves of each
> > operation requiring a full rotation between them). For large writes,
> > Raid5 system catches up, because the parity can be entirely calculated
> > the data sent, so it does not need to do the reads.
> > I would therefore expect a mirrored system to approach, but not reach,
> > twice the performance of a Raid5 system
> A mirrored system when writing should, at best, be no faster than a
> non-mirrored system. Unlike reading, it has to write a complete copy of
> data to both disks, so there are no performance gains to be had. RAID5
> be a bit slower than RAID1, due to the need for calculating parity.
See explanation above. For large writes, you are correct. For smaller ones,
and for the scruffy bits at the beginning and end of large writes, RAID 5
performance will approach 50% of Raid 1.