[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hot-add unformatted drive to RAID array automagically



On Fri, 2005-02-18 at 15:26 +1100, Russell Coker wrote:
> On Friday 18 February 2005 12:09, Donovan Baarda <abo@minkirri.apana.org.au> 
> wrote:
> > > A RAID-5 setup without NVRAM for write-back cache will give poor write
> > > performance.  If you want to write one sector to a RAID-5 array then the
> > > controller has to read the original sector and the checksum sector and
> > > then write to the sector and the new checksum.  This makes a single write
> > > become two reads and two writes (one read and re-write on each of two
> > > disks).  All good hardware RAID systems have NVRAM write-back caches to
> > > allow write-combining on RAID-5 lines.  This gives a massive performance
> > > benefit.
> >
> > But surely writing 4 sectors (in a 4+1 RAID5) is implemented as writing
> > 1 sector to each disk in parallel (4 data sectors, 1 checksum). So if
> > you were using a block size of 2K (4 x 512Bytes disc sector size), you
> > would get a 4 x speedup (assuming checksum calculation is negligible).
> 
> 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 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. 

> 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?

-- 
Donovan Baarda <abo@minkirri.apana.org.au>
http://minkirri.apana.org.au/~abo/



Reply to: