Re: hot-add unformatted drive to RAID array automagically
On Friday 18 February 2005 15:40, Donovan Baarda <abo@minkirri.apana.org.au>
wrote:
> > Writing one sector to each of four disks will not be much faster than
> > writing four contiguous sectors to one disk. In fact it may be slower on
> > average as the operation will not be complete until all disks have
> > written so the time taken for the operation will be the worst-case out of
> > four seeks rather than the average.
>
> Isn't this also true of RAID-0 striping? How come it gives such a
> performance "win" when RAID-5 doesn't?
If your RAID-0 stripe size is smaller than the typical write size then it
won't give a performance benefit.
> If you always write 2K blocks, the heads will aways be at the same spot
> on each disk, so the seek times will be the same for each disk, and the
> "worst-case" seek time will be not much different to the average.
The disk is spinning. The "average access" (not seek time) is comprised of
the time taken to move the heads to the correct track (strictly the real seek
time) and the time taken for the disk to spin to a position such that the
sector that is required is under the heads. For a 10,000rpm disk (not the
fastest we can get nowadays but still quite fast) the time taken for a
complete revolution is 6ms. This means that the average time to find a
sector will be 3ms once the heads are on the correct cylinder.
If there is only one disk being used for a small write then the average time
will be 3ms. If there are four disks and their spindles are not synchronised
(I think that synchronised disks have not been manufactured for some time)
then the average time for the sector to be found on all disks will be greater
than 3ms, maybe close to 6ms.
> > So writing to a RAID-5 is expected to always be slower than writing to a
> > single disk for small writes. If you write 1G of data contiguously then
> > RAID-5 should be a lot faster.
>
> [...]
>
> I guess this depends on the definition of "small". Provided you use
> blocks that are a multiple of "full stripes", you should get 4x faster
> throughput without much worse seek time. Shouldn't you?
Only if the amount of data written is large enough that the linear IO
performance of the disk is the bottleneck not the seek time. If the disk has
a linear transfer rate of 50MB/s and an average access time of 8ms then for
any block of data less than 400K (50MB*.008) the access time will dominate.
If you do a RAID-5 write such that each disk gets 400K of linear data written
then it's very likely that the time taken for that operation will be notably
less than it would on a single disk. If the total being written is less than
400K then you should expect a single disk to do better (providing that
nothing else is happening in the system - RAID-5 gives some benefits when
multiple processes are accessing the disk).
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
Reply to: