Date: Wed, 18 Oct 2000 20:24:38 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Tom <tom@uniserve.com> Cc: Mike Hoskins <mike@adept.org>, Danny Braniss <danny@cs.huji.ac.il>, Gerhard Sittig <Gerhard.Sittig@gmx.net>, freebsd-stable@FreeBSD.ORG Subject: Re: PERC2 RAID support in 4.1-STABLE Message-ID: <200010190324.e9J3Oco92249@earth.backplane.com> References: <Pine.BSF.4.05.10010181731440.526-100000@shell.uniserve.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
:> :RAID 5. RAID 1 seems fast and reliable given a decent controller with
:> :good recovery options, and RAID 10 sounds like a better solution with a
:> :larger quantity of drives.
:>
:> A mirrored setup (RAID-1) will be a whole lot faster then a parity
:> setup (RAID-5), since different read requests can be dispatched to
:> both sides of the mirror simultaniously and writing does not require
:> parity calculation.
:
: A RAID5 system can also send different read requests to different disks.
:
: Writing is another issue. Writing to a RAID5 volume can be costly.
:Writing is ususally one third the speed of reading, especially small
:random writes.
:
:Tom
:Uniserve
Well, yes, but only if the requests wind up on different disks.
In a RAID-5 system, two wildly different requests might still
*always* wind up on the same physical disk. There isn't anything the
controller can do about it -- that disk is going to have to do a full
random seek.
This means that the worst case per-disk seek delay in a RAID-5 system
can be just as bad as if you had a single hard drive.
A RAID-1 system, however, can choose which of two disks to issue the
read to. For example, a RAID-1 system can pull the first 12.5GB of a
25GB partition off of disk A and the second 12.5GB off of disk A's mirror,
resulting in a worst case per-disk seek delay that is 2/3 the worst
case in a RAID-5 system. (That's just an example. In truth the RAID-1
system can zone the I/O dynamically, breaking requests up however it
wishes).
This is in addition to the doubling of performance the RAID-1 system
gets by virtue of having twice as many disks. The actual realized
benefit of a RAID-1 system isn't just 2x a RAID-5 system, it's more
like 2.5x a RAID-5 system due to the ability to zone.
When RAID-1 zones its requests, it also has the side effect of making
the hard drive's internal caches more effective. A hard drive's internal
caches are themselves zoned, but generally too small to be of real benefit
in a completely random-seeking environment. RAID-1's own zoning has the
effect of improving the hard drive's internal zoning effectiveness
by reducing the amount of randomness the hard drive sees and making it
more likely that the hard drive will be able to service some of the
read requests from its internal cache. It isn't a big improvement,
but it is an improvement.
Do not underestimate the importance of seek delays. This illustrates
the importance, and also demonstrates the hard drive's internal
cache zoning:
tty da0 cpu
tin tout KB/t tps MB/s us ni sy in id
0 22 1.00 8775 8.57 0 0 14 10 76 one sequential reader
0 22 1.00 8811 8.60 0 0 13 9 78
3 41 1.00 2522 2.47 0 0 3 4 93 two sequential readers
0 22 1.00 2556 2.50 0 0 3 7 90 (reading from different areas)
0 23 1.00 102 0.10 0 0 1 0 99 three sequential readers
0 21 1.00 112 0.11 0 0 0 0100
My particular drive is internally optimized for two zones, then
performance goes to hell.
Here's the same test using only half the disk:
tty da0 cpu
tin tout KB/t tps MB/s us ni sy in id
0 22 1.00 8648 8.45 0 0 12 10 78 one sequential reader
0 29 1.00 8630 8.43 1 0 14 10 76
0 22 1.00 2625 2.56 0 0 4 1 95 two sequential readers
0 22 1.00 2619 2.56 0 0 5 3 92
0 21 1.00 166 0.16 0 0 0 0 99 three sequential readers
0 21 1.00 164 0.16 0 0 0 0 99
As you can see, worst case seek performance is higher ... 165 transfers
per second rather then 108 transfers per second.
The ability for a RAID-1 system to control the distribution of
I/O requests adds another dimension to the worst case seek performance.
With a good RAID-1 system, I could take the above disk, mirror it,
and the worst case seek performance would not occur until I had 5
sequential readers reading from different portions of the RAID volume.
The very best RAID-5 configuration would still blow up at 3.
So this is our tradeoff... cost verses performance for a given amount of
storage. If you need performance X for amount Y of disk space, RAID-5
will give you less performance but cost less (fewer disks), and RAID-1
will give you higher performance and cost more (more disks).
Ultimately what matters is not the amount of disk space you have, but
the amount of disk space you need. This is why you can't approach the
problem from an equal-cost point of view. If your application needs
50GB of disk storage then having a RAID-5 system capable of storing
100GB verses a RAID-1 system capable of storing 50GB, for the same price,
doesn't buy you anything but lower performance.
-Matt
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010190324.e9J3Oco92249>
