linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* raid1 does not seem faster
@ 2007-04-01 12:19 Jan Engelhardt
  2007-04-01 12:27 ` Henrik Holst
  2007-04-01 12:58 ` Al Boldi
  0 siblings, 2 replies; 14+ messages in thread
From: Jan Engelhardt @ 2007-04-01 12:19 UTC (permalink / raw)
  To: linux-raid

Hello list,


normally, I'd think that combining drives into a raid1 array would give 
me at least a little improvement in read speed. In my setup however, 
this does not seem to be the case.

14:16 opteron:/var/log # hdparm -t /dev/sda
 Timing buffered disk reads:  170 MB in  3.01 seconds =  56.52 MB/sec
14:17 opteron:/var/log # hdparm -t /dev/md3
 Timing buffered disk reads:  170 MB in  3.01 seconds =  56.45 MB/sec
(and dd_rescue shows the same numbers)

The raid array was created using
# mdadm -C /dev/md3 -b internal -e 1.0 -l 1 -n 2 /dev/sd[ab]3


Jan
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-01 12:19 raid1 does not seem faster Jan Engelhardt
@ 2007-04-01 12:27 ` Henrik Holst
  2007-04-01 12:58 ` Al Boldi
  1 sibling, 0 replies; 14+ messages in thread
From: Henrik Holst @ 2007-04-01 12:27 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-raid

On Sun, 2007-04-01 at 14:19 +0200, Jan Engelhardt wrote:
> Hello list,
> 
> 
> normally, I'd think that combining drives into a raid1 array would give 
> me at least a little improvement in read speed. In my setup however, 
> this does not seem to be the case.
> 
> 14:16 opteron:/var/log # hdparm -t /dev/sda
>  Timing buffered disk reads:  170 MB in  3.01 seconds =  56.52 MB/sec
> 14:17 opteron:/var/log # hdparm -t /dev/md3
>  Timing buffered disk reads:  170 MB in  3.01 seconds =  56.45 MB/sec
> (and dd_rescue shows the same numbers)
> 
> The raid array was created using
> # mdadm -C /dev/md3 -b internal -e 1.0 -l 1 -n 2 /dev/sd[ab]3
> 
> 
> Jan

From section 9.5 in [FAQ]

"To check out speed and performance of your RAID systems, do NOT use
hdparm. It won't do real benchmarking of the arrays." <snip>

I might recommend bonnie++. I think I've seen accepted benchmarks here
using bonnie++.

[FAQ] http://tldp.org/HOWTO/html_single/Software-RAID-HOWTO/#s9

-- 
Henrik Holst <holst@matmech.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-01 12:19 raid1 does not seem faster Jan Engelhardt
  2007-04-01 12:27 ` Henrik Holst
@ 2007-04-01 12:58 ` Al Boldi
       [not found]   ` <46118473.10205@tmr.com>
  1 sibling, 1 reply; 14+ messages in thread
From: Al Boldi @ 2007-04-01 12:58 UTC (permalink / raw)
  To: linux-raid

Jan Engelhardt wrote:
> normally, I'd think that combining drives into a raid1 array would give
> me at least a little improvement in read speed. In my setup however,
> this does not seem to be the case.
>
> 14:16 opteron:/var/log # hdparm -t /dev/sda
>  Timing buffered disk reads:  170 MB in  3.01 seconds =  56.52 MB/sec
> 14:17 opteron:/var/log # hdparm -t /dev/md3
>  Timing buffered disk reads:  170 MB in  3.01 seconds =  56.45 MB/sec
> (and dd_rescue shows the same numbers)

The problem is that raid1 one doesn't do striped reads, but rather uses 
read-balancing per proc.  Try your test with parallel reads; it should be 
faster.

You could use raid10, but then you loose single-disk-image compatibility.


Thanks!

--
Al

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
       [not found]   ` <46118473.10205@tmr.com>
@ 2007-04-03 13:42     ` Al Boldi
  2007-04-04 23:11       ` Bill Davidsen
  0 siblings, 1 reply; 14+ messages in thread
From: Al Boldi @ 2007-04-03 13:42 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-raid

Bill Davidsen wrote:
> Al Boldi wrote:
> > The problem is that raid1 one doesn't do striped reads, but rather uses
> > read-balancing per proc.  Try your test with parallel reads; it should
> > be faster.
:
:
> It would be nice if reads larger than some size were considered as
> candidates for multiple devices. By setting the readahead larger than
> that value speed increases would be noted for sequential access.

Actually, that's what I thought for a long time too, but as Neil once pointed 
out, for striped reads to be efficient, each chunk should be located 
sequentially, as to avoid any seeks.  This is only possible by introducing 
some offset layout, as in raid10, which infers a loss of raid1's 
single-disk-image compatibility.

What could be feasible, is some kind of an initial burst striped readahead, 
which could possibly improve small reads < (readahead * nr_of_disks).


Thanks!

--
Al


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-03 13:42     ` Al Boldi
@ 2007-04-04 23:11       ` Bill Davidsen
  2007-04-05  4:58         ` Iustin Pop
  0 siblings, 1 reply; 14+ messages in thread
From: Bill Davidsen @ 2007-04-04 23:11 UTC (permalink / raw)
  To: Al Boldi; +Cc: linux-raid

Al Boldi wrote:
> Bill Davidsen wrote:
>   
>> Al Boldi wrote:
>>     
>>> The problem is that raid1 one doesn't do striped reads, but rather uses
>>> read-balancing per proc.  Try your test with parallel reads; it should
>>> be faster.
>>>       
> :
> :
>   
>> It would be nice if reads larger than some size were considered as
>> candidates for multiple devices. By setting the readahead larger than
>> that value speed increases would be noted for sequential access.
>>     
>
> Actually, that's what I thought for a long time too, but as Neil once pointed 
> out, for striped reads to be efficient, each chunk should be located 
> sequentially, as to avoid any seeks.  This is only possible by introducing 
> some offset layout, as in raid10, which infers a loss of raid1's 
> single-disk-image compatibility.
>   
I can't imaging that the offset needs to be physical, there's a 
translation done from the chunk address on the array to the physical 
address on the drive, and beyond that usually a translation from the 
logical position in a partition to a physical LBA location on the drive 
as a whole.
> What could be feasible, is some kind of an initial burst striped readahead, 
> which could possibly improve small reads < (readahead * nr_of_disks).
You are correct, but I think if an optimization were to be done, some balance between the read time, seek time, and read size could be done. Using more than one drive only makes sense when the read transfer time is significantly longer than the seek time. With an aggressive readahead set for the array that would happen regularly.

It's possible, it just takes the time to do it, like many other "nice" things.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-04 23:11       ` Bill Davidsen
@ 2007-04-05  4:58         ` Iustin Pop
  2007-04-05  8:11           ` Justin Piszcz
  2007-04-05 13:45           ` Bill Davidsen
  0 siblings, 2 replies; 14+ messages in thread
From: Iustin Pop @ 2007-04-05  4:58 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Al Boldi, linux-raid

On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
> You are correct, but I think if an optimization were to be done, some 
> balance between the read time, seek time, and read size could be done. 
> Using more than one drive only makes sense when the read transfer time is 
> significantly longer than the seek time. With an aggressive readahead set 
> for the array that would happen regularly.
> 
> It's possible, it just takes the time to do it, like many other "nice" 
> things.

Maybe yes, but why optimise the single-reader case? raid1 already can
read in parallel from the drives when multiple processes read from the
raid1. Optimising the single reader can help in hdparm or other
benchmark cases, but in real life I see very often the total throughput
of a (two drive) raid1 being around two times the throughput of a single
drive.

regards,
iustin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-05  4:58         ` Iustin Pop
@ 2007-04-05  8:11           ` Justin Piszcz
  2007-04-05 15:31             ` Iustin Pop
  2007-04-09 10:53             ` Justin Piszcz
  2007-04-05 13:45           ` Bill Davidsen
  1 sibling, 2 replies; 14+ messages in thread
From: Justin Piszcz @ 2007-04-05  8:11 UTC (permalink / raw)
  To: Iustin Pop; +Cc: Bill Davidsen, Al Boldi, linux-raid



On Thu, 5 Apr 2007, Iustin Pop wrote:

> On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
>> You are correct, but I think if an optimization were to be done, some
>> balance between the read time, seek time, and read size could be done.
>> Using more than one drive only makes sense when the read transfer time is
>> significantly longer than the seek time. With an aggressive readahead set
>> for the array that would happen regularly.
>>
>> It's possible, it just takes the time to do it, like many other "nice"
>> things.
>
> Maybe yes, but why optimise the single-reader case? raid1 already can
> read in parallel from the drives when multiple processes read from the
> raid1. Optimising the single reader can help in hdparm or other
> benchmark cases, but in real life I see very often the total throughput
> of a (two drive) raid1 being around two times the throughput of a single
> drive.
>
> regards,
> iustin
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Really? I have copied a file from a SW RAID1 (5GB) and I only saw 
60MB/s not the 120MB/s the (RAID1) is capable of to the 
destination (which can easily do > 160MB/s sustained read/write).

Justin.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-05  4:58         ` Iustin Pop
  2007-04-05  8:11           ` Justin Piszcz
@ 2007-04-05 13:45           ` Bill Davidsen
  2007-04-05 15:38             ` Iustin Pop
  1 sibling, 1 reply; 14+ messages in thread
From: Bill Davidsen @ 2007-04-05 13:45 UTC (permalink / raw)
  To: Bill Davidsen, Al Boldi, linux-raid

Iustin Pop wrote:
> On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
>   
>> You are correct, but I think if an optimization were to be done, some 
>> balance between the read time, seek time, and read size could be done. 
>> Using more than one drive only makes sense when the read transfer time is 
>> significantly longer than the seek time. With an aggressive readahead set 
>> for the array that would happen regularly.
>>
>> It's possible, it just takes the time to do it, like many other "nice" 
>> things.
>>     
>
> Maybe yes, but why optimise the single-reader case? raid1 already can
> read in parallel from the drives when multiple processes read from the
> raid1. Optimising the single reader can help in hdparm or other
> benchmark cases, but in real life I see very often the total throughput
> of a (two drive) raid1 being around two times the throughput of a single
> drive.

Why optimize the single thread case? Any process which has low CPU 
requirements (by current standards) becomes i/o bound. The obvious 
candidates are grep, sed, dd, or awk. And don't overlook the benefits of 
reliable swap.

Test script modifications taking place as I type, I post the script and 
some results later this week, barring urgent support issues.

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-05  8:11           ` Justin Piszcz
@ 2007-04-05 15:31             ` Iustin Pop
  2007-04-05 15:57               ` Justin Piszcz
  2007-04-09 10:53             ` Justin Piszcz
  1 sibling, 1 reply; 14+ messages in thread
From: Iustin Pop @ 2007-04-05 15:31 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: Bill Davidsen, Al Boldi, linux-raid

On Thu, Apr 05, 2007 at 04:11:35AM -0400, Justin Piszcz wrote:
> 
> 
> On Thu, 5 Apr 2007, Iustin Pop wrote:
> 
> >On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
> >>You are correct, but I think if an optimization were to be done, some
> >>balance between the read time, seek time, and read size could be done.
> >>Using more than one drive only makes sense when the read transfer time is
> >>significantly longer than the seek time. With an aggressive readahead set
> >>for the array that would happen regularly.
> >>
> >>It's possible, it just takes the time to do it, like many other "nice"
> >>things.
> >
> >Maybe yes, but why optimise the single-reader case? raid1 already can
> >read in parallel from the drives when multiple processes read from the
> >raid1. Optimising the single reader can help in hdparm or other
> >benchmark cases, but in real life I see very often the total throughput
> >of a (two drive) raid1 being around two times the throughput of a single
> >drive.
> >
> >regards,
> >iustin
> >-
> >To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> >the body of a message to majordomo@vger.kernel.org
> >More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> Really? I have copied a file from a SW RAID1 (5GB) and I only saw 
> 60MB/s not the 120MB/s the (RAID1) is capable of to the 
> destination (which can easily do > 160MB/s sustained read/write).

Did you copy it multi-threaded? I said "*multiple-readers* show improved
speed" and you said "I copied *one* file". Try copying two files in
parallel.

I'm doing in two xterms "cat file1 >/dev/null", "cat file2 >/dev/null"
and my raid1 shows ~110 MB/s, each drive doing about half.  On file only
does about 60 MB/s (this is over a PCI raid controller so the max 110
MB/s is a PCI bus limitation).

Iustin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-05 13:45           ` Bill Davidsen
@ 2007-04-05 15:38             ` Iustin Pop
  0 siblings, 0 replies; 14+ messages in thread
From: Iustin Pop @ 2007-04-05 15:38 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: Al Boldi, linux-raid

On Thu, Apr 05, 2007 at 09:45:52AM -0400, Bill Davidsen wrote:
> Iustin Pop wrote:
> >On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
> >  
> >>You are correct, but I think if an optimization were to be done, some 
> >>balance between the read time, seek time, and read size could be done. 
> >>Using more than one drive only makes sense when the read transfer time is 
> >>significantly longer than the seek time. With an aggressive readahead set 
> >>for the array that would happen regularly.
> >>
> >>It's possible, it just takes the time to do it, like many other "nice" 
> >>things.
> >>    
> >
> >Maybe yes, but why optimise the single-reader case? raid1 already can
> >read in parallel from the drives when multiple processes read from the
> >raid1. Optimising the single reader can help in hdparm or other
> >benchmark cases, but in real life I see very often the total throughput
> >of a (two drive) raid1 being around two times the throughput of a single
> >drive.
> 
> Why optimize the single thread case? Any process which has low CPU 
> requirements (by current standards) becomes i/o bound. The obvious 
> candidates are grep, sed, dd, or awk. And don't overlook the benefits of 
> reliable swap.

"Premature optimisation is the root of all evil". Of course it's
possible to do it. But is it worth it? In terms of code complexity, of
possible bugs, etc. And what do you gain? raid0 performance and
mirroring? it's already available in raid10.

Reliable swap? Yes, I do that over raid1. But if raid raw I/O speed is
the bottleneck, the solution is add more ram instead of optimising
raid1.

And honestly, I like the raid1 code to be as simple as possible. If you
really find grep, sed, dd to be a bottleneck, you need to think if the
tools you are using are the right tools. As I said, raid1 shows good
read speed if using *more that one process doing I/O at a time*. Two
dd's in parallel are using two drives.

Iustin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-05 15:31             ` Iustin Pop
@ 2007-04-05 15:57               ` Justin Piszcz
  2007-04-05 19:19                 ` Bill Davidsen
  0 siblings, 1 reply; 14+ messages in thread
From: Justin Piszcz @ 2007-04-05 15:57 UTC (permalink / raw)
  To: Iustin Pop; +Cc: Bill Davidsen, Al Boldi, linux-raid



On Thu, 5 Apr 2007, Iustin Pop wrote:

> On Thu, Apr 05, 2007 at 04:11:35AM -0400, Justin Piszcz wrote:
>>
>>
>> On Thu, 5 Apr 2007, Iustin Pop wrote:
>>
>>> On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
>>>> You are correct, but I think if an optimization were to be done, some
>>>> balance between the read time, seek time, and read size could be done.
>>>> Using more than one drive only makes sense when the read transfer time is
>>>> significantly longer than the seek time. With an aggressive readahead set
>>>> for the array that would happen regularly.
>>>>
>>>> It's possible, it just takes the time to do it, like many other "nice"
>>>> things.
>>>
>>> Maybe yes, but why optimise the single-reader case? raid1 already can
>>> read in parallel from the drives when multiple processes read from the
>>> raid1. Optimising the single reader can help in hdparm or other
>>> benchmark cases, but in real life I see very often the total throughput
>>> of a (two drive) raid1 being around two times the throughput of a single
>>> drive.
>>>
>>> regards,
>>> iustin
>>> -
>>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>> Really? I have copied a file from a SW RAID1 (5GB) and I only saw
>> 60MB/s not the 120MB/s the (RAID1) is capable of to the
>> destination (which can easily do > 160MB/s sustained read/write).
>
> Did you copy it multi-threaded? I said "*multiple-readers* show improved
> speed" and you said "I copied *one* file". Try copying two files in
> parallel.
>
> I'm doing in two xterms "cat file1 >/dev/null", "cat file2 >/dev/null"
> and my raid1 shows ~110 MB/s, each drive doing about half.  On file only
> does about 60 MB/s (this is over a PCI raid controller so the max 110
> MB/s is a PCI bus limitation).
>
> Iustin
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Ah, nope, I only did a single copy, I did not parallelize the operations.

Justin.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-05 15:57               ` Justin Piszcz
@ 2007-04-05 19:19                 ` Bill Davidsen
  0 siblings, 0 replies; 14+ messages in thread
From: Bill Davidsen @ 2007-04-05 19:19 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: Iustin Pop, Al Boldi, linux-raid

Justin Piszcz wrote:
>
>
> On Thu, 5 Apr 2007, Iustin Pop wrote:
>
>> On Thu, Apr 05, 2007 at 04:11:35AM -0400, Justin Piszcz wrote:
>>>
>>>
>>> On Thu, 5 Apr 2007, Iustin Pop wrote:
>>>
>>>> On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
>>>>> You are correct, but I think if an optimization were to be done, some
>>>>> balance between the read time, seek time, and read size could be 
>>>>> done.
>>>>> Using more than one drive only makes sense when the read transfer 
>>>>> time is
>>>>> significantly longer than the seek time. With an aggressive 
>>>>> readahead set
>>>>> for the array that would happen regularly.
>>>>>
>>>>> It's possible, it just takes the time to do it, like many other 
>>>>> "nice"
>>>>> things.
>>>>
>>>> Maybe yes, but why optimise the single-reader case? raid1 already can
>>>> read in parallel from the drives when multiple processes read from the
>>>> raid1. Optimising the single reader can help in hdparm or other
>>>> benchmark cases, but in real life I see very often the total 
>>>> throughput
>>>> of a (two drive) raid1 being around two times the throughput of a 
>>>> single
>>>> drive.
>>>>
>>>> regards,
>>>> iustin
>>>> -
>>>> To unsubscribe from this list: send the line "unsubscribe 
>>>> linux-raid" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>>>
>>> Really? I have copied a file from a SW RAID1 (5GB) and I only saw
>>> 60MB/s not the 120MB/s the (RAID1) is capable of to the
>>> destination (which can easily do > 160MB/s sustained read/write).
>>
>> Did you copy it multi-threaded? I said "*multiple-readers* show improved
>> speed" and you said "I copied *one* file". Try copying two files in
>> parallel.
>>
>> I'm doing in two xterms "cat file1 >/dev/null", "cat file2 >/dev/null"
>> and my raid1 shows ~110 MB/s, each drive doing about half.  On file only
>> does about 60 MB/s (this is over a PCI raid controller so the max 110
>> MB/s is a PCI bus limitation).
>>
>> Iustin
>> -
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> Ah, nope, I only did a single copy, I did not parallelize the operations.
And it would be nice not to have to jump through hoops to get better 
performance... You can implement raid[01] at the user level, too, why 
bother to have it in the kernel? ;-)

-- 
bill davidsen <davidsen@tmr.com>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-05  8:11           ` Justin Piszcz
  2007-04-05 15:31             ` Iustin Pop
@ 2007-04-09 10:53             ` Justin Piszcz
  2007-04-09 12:17               ` Iustin Pop
  1 sibling, 1 reply; 14+ messages in thread
From: Justin Piszcz @ 2007-04-09 10:53 UTC (permalink / raw)
  To: Iustin Pop; +Cc: Bill Davidsen, Al Boldi, linux-raid



On Thu, 5 Apr 2007, Justin Piszcz wrote:

>
>
> On Thu, 5 Apr 2007, Iustin Pop wrote:
>
>> On Wed, Apr 04, 2007 at 07:11:50PM -0400, Bill Davidsen wrote:
>>> You are correct, but I think if an optimization were to be done, some
>>> balance between the read time, seek time, and read size could be done.
>>> Using more than one drive only makes sense when the read transfer time is
>>> significantly longer than the seek time. With an aggressive readahead set
>>> for the array that would happen regularly.
>>> 
>>> It's possible, it just takes the time to do it, like many other "nice"
>>> things.
>> 
>> Maybe yes, but why optimise the single-reader case? raid1 already can
>> read in parallel from the drives when multiple processes read from the
>> raid1. Optimising the single reader can help in hdparm or other
>> benchmark cases, but in real life I see very often the total throughput
>> of a (two drive) raid1 being around two times the throughput of a single
>> drive.
>> 
>> regards,
>> iustin
>> -
>> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
>
> Really? I have copied a file from a SW RAID1 (5GB) and I only saw 60MB/s not 
> the 120MB/s the (RAID1) is capable of to the destination (which can easily do 
>> 160MB/s sustained read/write).
>
> Justin.
>

Using 2 threads made no difference either.

It was not until I did 3 simultaneous copies that I saw 110-130MB/s 
through vmstat 1, until then, it only used one drive, even with two cp's, 
how come it needs to be three or more?

Justin.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: raid1 does not seem faster
  2007-04-09 10:53             ` Justin Piszcz
@ 2007-04-09 12:17               ` Iustin Pop
  0 siblings, 0 replies; 14+ messages in thread
From: Iustin Pop @ 2007-04-09 12:17 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: Bill Davidsen, Al Boldi, linux-raid

On Mon, Apr 09, 2007 at 06:53:26AM -0400, Justin Piszcz wrote:
> Using 2 threads made no difference either.
> 
> It was not until I did 3 simultaneous copies that I saw 110-130MB/s 
> through vmstat 1, until then, it only used one drive, even with two cp's, 
> how come it needs to be three or more?

Because, as I understand it, it's an optimisation, not a rule. Quoting
from the manpage (md):
"Once initialised, each device in a RAID1 array contains exactly the
same data.  Changes are written to all devices in parallel.  Data is
read from any one device.  The driver attempts to distribute read
requests across all devices to maximise performance."

The key word here is "attempts". I looked a while ago over the source
code and IIRC it says that it tries to direct a read request to the
drive whose head is closest to the requested sector, or if not possible
a random drive. To me, this seems a good strategy, which optimises
server-type workloads.

regards,
iustin

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-04-09 12:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-01 12:19 raid1 does not seem faster Jan Engelhardt
2007-04-01 12:27 ` Henrik Holst
2007-04-01 12:58 ` Al Boldi
     [not found]   ` <46118473.10205@tmr.com>
2007-04-03 13:42     ` Al Boldi
2007-04-04 23:11       ` Bill Davidsen
2007-04-05  4:58         ` Iustin Pop
2007-04-05  8:11           ` Justin Piszcz
2007-04-05 15:31             ` Iustin Pop
2007-04-05 15:57               ` Justin Piszcz
2007-04-05 19:19                 ` Bill Davidsen
2007-04-09 10:53             ` Justin Piszcz
2007-04-09 12:17               ` Iustin Pop
2007-04-05 13:45           ` Bill Davidsen
2007-04-05 15:38             ` Iustin Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).