Hi Benjamin,

Thanks for your insight into the reasons why this may be the case, and I
agree with your assumptions, I really only added the RAID0 at the end
drives with some left over space just to see what RAID0 was like.. One
thing I know is that Mandrake makes setting up RAID a joy..

Cheers
Mark 


On Sun, 2002-09-29 at 06:03, Benjamin Pflugmann wrote:
> Hi.
> 
> On Sat 2002-09-28 at 20:20:37 +1000, Mark Williamson wrote:
> > 
> > Just trying to workout why I have a Raid 0 that is slower that a
> > Raid 1 device..
> 
> Why do you think that this shouldn't be the case?  AFAIK, usually
> RAID0 is at most comparable to RAID1 on reading speed, but may be
> slower dependend on use. RAID0 is usually faster quite a bit on
> writing.
> 
> 
> Regardless, there are several possible reasons. The two that come to
> my mind:
> 
> - speed of different partitions can be different (remember, speed on
>   inner side and outer side of the disk differ usually). For example,
>   one of my disks gives:
> 
>   /dev/hda1:
>     Timing buffer-cache reads:   128 MB in  0.80 seconds =160.00 MB/sec
>     Timing buffered disk reads:  64 MB in  2.88 seconds = 22.22 MB/sec
> 
>   /dev/hda4:
>     Timing buffer-cache reads:   128 MB in  0.81 seconds =158.02 MB/sec
>     Timing buffered disk reads:  64 MB in  3.94 seconds = 16.24 MB/sec
> 
>   You can find out by measuring the underlying partitions directly or
>   eliminate that factor by creating the RAID0 and RAID1 partitions on
>   the same underlying partition one after the other and running the
>   tests.
> 
> 
> - AFAIK, RAID0 (striping) can only (mainly) benefit from 2 disks, if
>   the read size is larger than the size of the stripes per underlying
>   disk. If hdparm uses small blocks to read, RAID0 will (or better:
>   should ;) only be marginally faster than the underlying disk. You
>   see, it is read from one, one, one, one, two, two, two, two, one,
>   one, one, one and so on.
> 
>   If the block read is larger than the stripe size, it will be read
>   one/two, one/two, one/two, which is what usually gives the speed
>   improvement on reading large files. You also get a nice boost with
>   disk seeks and so on, but
> 
>   Note that if the assumption is true, this (the test reading small
>   blocks in row) is an uncommon case: usually either you read small
>   files from not-adjoining blocks, then you will gain from disk seeks
>   getting distributed to two disks, or you read large files, where you
>   gain from (almost) parallel reads. Neither would be the case with
>   small test blocks.
> 
>   
>   RAID1 (mirroring) on the other hand, may distribute reads
>   arbitrarily to the two underlying disks, because they both contain
>   the same data and therefore is not affected by such patterns.
> 
>   Note that the above is only a possibility based on the behaviour of
>   RAID0 and RAID1. I do not know if the above really matters in this
>   case. If you want to know, you can try to play with the size for
>   striping and then run the test again.
> 
> 
> Bye,
> 
>       Benjamin.
> 
> 
> > Now I have here a /dev/md0 which is a Raid1 and /dev/md4 which is Raid0 
> > 
> > now using hdparm to test the speed..
> > 
> > # hdparm -Tt /dev/md0
> > /dev/md0:
> >  Timing buffer-cache reads:   128 MB in  0.52 seconds =246.15 MB/sec
> >  Timing buffered disk reads:  64 MB in  1.60 seconds = 40.00 MB/sec
> > 
> > # hdparm -Tt /dev/md4
> > /dev/md4:
> >  Timing buffer-cache reads:   128 MB in  0.51 seconds =250.98 MB/sec
> >  Timing buffered disk reads:  64 MB in  2.58 seconds = 24.81 MB/sec
> > 
> [...]



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to