Originally posted by: Matthias99
Originally posted by: smn198
But why, if the same data is stored on 2 drives, why can it not get half from each drive?
It can. Sometimes. Actually, RAID1
is faster -- of course, it depends on what you mean by "faster".
A RAID1 array of N disks allows you to always run up to N parallel reads -- if you find RAID tests of something that does a lot of small, random parallel reads (for instance, a webserver), you'll find that RAID1 blows everything else out of the water. Its write performance, however, is terrible (as it doesn't scale up at all with the number of disks).
It also doesn't help a whole lot with STR (Sustained Transfer Rate). For a fairly small read (less than N stripes for an N-disk array), you can sort of 'pseudo-stripe' the read by having each disk read one of the N stripes you need. But beyond that, the disks need to reseek all the time to find the next stripe you haven't read yet, and that takes enough time to basically kill the benefit you get from doing the reads in parallel. Drives are MUCH faster when doing long linear reads than they are doing "Read 4K, seek, Read 4K, seek, Read 4K, seek, ...". With a striped RAID level (such as RAID0, RAID1+0, or RAID5), when you do one big read, each drive just reads linearly, so you get maximum STR. See crappy diagram below:
RAID1:
DISK1.....A.....B.....C.....D.....E.....F.....
DISK2.....A.....B.....C.....D.....E.....F.....
DISK3.....A.....B.....C.....D.....E.....F.....
DISK4.....A.....B.....C.....D.....E.....F.....
RAID0:
DISK1.....A.....E.....I.....
DISK2.....B.....F.....J.....
DISK3.....C.....G.....K.....
DISK4.....D.....H.....L.....
If you want to read blocks A-D, you can see that the RAID1 and RAID0 can both split the read up into four parallel operations. But if you wanted to read blocks A-L, you would get the following usage patterns:
RAID1:
DISK1: Seek to A, Read A, seek to E, read E, seek to I, read I
DISK2: Seek to B, Read B, seek to F, read F, seek to J, read J
DISK3: Seek to C, Read C, seek to G, read G, seek to K, read K
DISK4: Seek to D, Read D, seek to H, read H, seek to L, read L
RAID0:
DISK1: Seek to A, Read A, Read E, Read I
DISK2: Seek to B, Read B, Read F, Read J
DISK3: Seek to C, Read C, Read G, Read K
DISK4: Seek to D, Read D, Read H, Read L
The RAID0 doesn't have to seek when doing linear reads. That's why it's faster doing those, but slower at small random reads (since the RAID1 can do them all in parallel, whereas the RAID0 can only do them in parallel if they do not need to access the same disks).