From: Goswin von Brederlow <goswin-v-b@web.de>
To: Keld Jorn Simonsen <keld@keldix.com>
Cc: "Ciprian Dorin, Craciun" <ciprian.craciun@gmail.com>,
linux-raid@vger.kernel.org
Subject: Re: Linux MD RAID 1 read performance tunning
Date: Thu, 24 Dec 2009 10:03:50 +0100 [thread overview]
Message-ID: <87d424rbex.fsf@frosties.localdomain> (raw)
In-Reply-To: <20091222182248.GA5719@rap.rap.dk> (Keld Jorn Simonsen's message of "Tue, 22 Dec 2009 20:22:49 +0200")
Keld Jørn Simonsen <keld@keldix.com> writes:
> On Tue, Dec 22, 2009 at 07:08:25PM +0200, Ciprian Dorin, Craciun wrote:
>> 2009/12/22 Keld Jørn Simonsen <keld@keldix.com>:
>> > On Tue, Dec 22, 2009 at 06:34:55PM +0200, Ciprian Dorin, Craciun wrote:
>> >> Hello all!
>> >>
>> >> I've created a 64G RAID 1 matrix from 3 real disks. (I intend to
>> >> use this as a target for backups.)
>> >> Now while playing around with this array, I've observed that the
>> >> read performance is quite low because it always reads from the disk in
>> >> the first slot (which happens to be the slowest...)
>> >>
>> >> So my questions are:
>> >> * is there any way to tell the MD driver to load-balance the reads
>> >> between the three disks?
>> >
>> > It does not make sense to do distributed reading in raid1 for sequential
>> > files. This is because it will not be faster to read from more drives,
>> > as this will only make the reading from one drive skipping blocks on
>> > that drive. In other words, in the time you use for skipping blocks on
>> > one drive, you could just as well have read the blocks. So then better
>> > just read all the blocks off one drive, and then do other possible IO
>> > from other drives.
>>
>> Aha. It makes sens now. But, does it mean that if I have parallel
>> IO's (from different read operations) they are going to be distributed
>> between the disks?
>
> It should, but I am not fully sure it does.
> But try it out with two concurrent reads of two big files, and then
> watch it with iostat
>
> Best regards
> keld
Actualy the kernel remembers the last read/write position for each
raid1 component and then uses the one which is nearest.
And when you read at 2/3 different positions at the same time then it
will use different components for each an use the same ones for
subsequent reads (as they will be nearer).
Try
dd if=/dev/md0 of=/dev/null bs=1M cunt=1024 skip=0 &
dd if=/dev/md0 of=/dev/null bs=1M cunt=1024 skip=1024 &
dd if=/dev/md0 of=/dev/null bs=1M cunt=1024 skip=2048
They should more or less get the same speed as a single dd.
MfG
Goswin
--
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
next prev parent reply other threads:[~2009-12-24 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 16:34 Linux MD RAID 1 read performance tunning Ciprian Dorin, Craciun
2009-12-22 16:52 ` Keld Jørn Simonsen
2009-12-22 17:08 ` Ciprian Dorin, Craciun
2009-12-22 18:22 ` Keld Jørn Simonsen
2009-12-24 9:03 ` Goswin von Brederlow [this message]
2009-12-24 9:16 ` Ciprian Dorin, Craciun
2009-12-24 12:41 ` Goswin von Brederlow
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=87d424rbex.fsf@frosties.localdomain \
--to=goswin-v-b@web.de \
--cc=ciprian.craciun@gmail.com \
--cc=keld@keldix.com \
--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