linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dimitrios Apostolou <jimis@gmx.net>
To: linux-raid@vger.kernel.org, iusty@k1024.org
Subject: Re: RAID1 and load-balancing during read
Date: Tue, 11 Sep 2007 17:47:37 +0200	[thread overview]
Message-ID: <46E6B899.50201@gmx.net> (raw)
In-Reply-To: <20070911034417.GA20596@teal.hq.k1024.org>

Iustin Pop wrote:
> On Mon, Sep 10, 2007 at 10:51:37PM +0300, Dimitrios Apostolou wrote:
>> On Monday 10 September 2007 22:35:30 Iustin Pop wrote:
>>> On Mon, Sep 10, 2007 at 10:29:30PM +0300, Dimitrios Apostolou wrote:
>>>> Hello list,
>>>>
>>>> I just created a RAID1 array consisting of two disks. After experiments
>>>> with processes *reading* from the device (badblocks, dd) and the iostat
>>>> program, I can see that only one disk is being utilised for reading. To
>>>> be exact, every time I execute the command one of the two disks is being
>>>> randomly used, but the other one has absolutely no activity.
>>>>
>>>> My question is: why isn't load balancing happening? Is there an option
>>>> I'm missing? Until now I though it was the default for all RAID1
>>>> implementations.
>>> Did you read the archives of this list? This question has been answered,
>>> like, 4 times already in the last months.
>>>
>>> And yes, the driver does do load balancing. Just not as RAID0 does,
>>> since it's not RAID0.
>> Of course I did a quick search in the archives but couldn't find anything. 
> Hmm, it's true that searching does not point out an easy to find
> response.

I now found archived replies to the subject, thanks for pointing that 
out. The outcome is that because of the way RAID1 works, doubling 
performance for sequential access is not feasible, or it is very hard.

I would be curious however, is anyone aware of hardware RAID 
implementations that actually improve sequential read performance?

> 
>> I'll search better, thanks anyway. Moreover, I think I found the answer in 
>> the code after posting. There is a comment somewhere in read_balance() 
>> saying "Don't change to another disk for sequential reads". I have to study 
>> it a bit to figure out *why* you chose that way. 
> Well, from what I understand, you cannot make a mirror behave like a
> stripe, plain and simple. There is no simple algorithm that makes
> sequential raid behave better.
> 
> OTOH, random I/O or multiple threads are being sped up by raid1. And

Indeed, and it is notable that on a benchmark I performed yesterday, 
RAID1 performed better (about 25%) than RAID0 on random seeks! (Of 
course all other numbers were worse).

> people have said on the list that using the raid10 module with only two
> disks and (IIRC) in offset or far mode will give better read
> performance, albeit it reduces write performance.
> 
> Hmmm, I think a patch is needed to md.4 in order to explain this right
> at the source of the confusion.

I will agree that this needs some clarification in the docs. Unless 
another patch is implemented that actually improves the performance. :-p

> 
> thanks,
> iustin

Thanks,
Dimitris

  parent reply	other threads:[~2007-09-11 15:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 19:29 RAID1 and load-balancing during read Dimitrios Apostolou
2007-09-10 19:35 ` Iustin Pop
2007-09-10 19:51   ` Dimitrios Apostolou
2007-09-11  3:44     ` Iustin Pop
2007-09-11 13:20       ` Goswin von Brederlow
2007-09-11 14:11         ` Neil Brown
2007-09-11 15:33         ` Dimitrios Apostolou
2007-09-11 20:10           ` Dimitrios Apostolou
2007-09-11 15:47       ` Dimitrios Apostolou [this message]
2007-09-11 16:07         ` Dimitrios Apostolou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46E6B899.50201@gmx.net \
    --to=jimis@gmx.net \
    --cc=iusty@k1024.org \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).