From: Neil Brown <neilb@suse.de>
To: "Raz Ben-Jehuda(caro)" <raziebe@gmail.com>
Cc: Linux RAID Mailing List <linux-raid@vger.kernel.org>
Subject: Re: raid5 write performance
Date: Thu, 19 Apr 2007 19:20:39 +1000 [thread overview]
Message-ID: <17959.13415.960988.143833@notabene.brown> (raw)
In-Reply-To: message from Raz Ben-Jehuda(caro) on Thursday April 19
On Thursday April 19, raziebe@gmail.com wrote:
>
> Neil Hello
> I have been doing some thinking. I feel we should take a different path here.
> In my tests I actually accumulate the user's buffers and when ready I submit
> them, an elevator like algorithm.
>
> The main problem is the amount of IO's the stripe cache can hold which is
> too small. My suggestion is to add an elevator of bios before moving them to the
> stripe cache, trying to postpone as much as needed allocation of a new stripe.
> This way we will be able to move as much as IOs to the "raid logic"
> without congesting
> it and still filling stripes if possible.
>
> Psuedo code;
>
> make_request()
> ...
> if IO direction is WRITE and IO not in stripe cache
> add IO to raid elevator
> ..
>
> raid5d()
> ...
> Is there a set of IOs in raid elevator such that they make a full stripe
> move IOs to raid handling
> while oldest IO in raid elevator is deadlined( 3ms ? )
> move IO to raid handling
> ....
>
> Does it make any sense ?
Yes.
The "Is there a set of IOs in raid elevator such that they make a full
stripe" would be hard to calculate.
However the concept is still fine.
In make request, if we cannot get a stripe_head without blocking, just
add the request to a list.
Once the number of active stripes drops below 75% (or 50% or
whatever), raid5 reprocessed all the bios on the list, some will get
added, some might not until next time.
The fact that a single bio can require many stripe_heads adds an
awkwardness. You would have to be able to store a partially-processed
request on the list, but we do that in retry_aligned_read, so we know
it is possible. Possibly the same code can be used for
retry_aligned_read and for retry_delayed_write.
And we can treat writes and reads the same - if no stripe_head is
available, stick it on a queue.
Another issue to be aware of is that write-throttling in the VM
depends on the fact that each device has a limited queue. Just
sticking everything on a list defeats thats. So we do need to impose
some limit on the number of request in the queue. Possibly we limit
the requests on the queue to some multiple of a full stripe.
NeilBrown
next prev parent reply other threads:[~2007-04-19 9:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-02 14:02 raid5 write performance Raz Ben-Jehuda(caro)
2006-07-02 22:35 ` Neil Brown
2006-08-13 13:19 ` Raz Ben-Jehuda(caro)
2006-08-28 4:32 ` Neil Brown
2007-03-30 21:44 ` Raz Ben-Jehuda(caro)
2007-03-31 21:28 ` Bill Davidsen
2007-03-31 23:03 ` Raz Ben-Jehuda(caro)
2007-04-01 2:16 ` Bill Davidsen
2007-04-01 23:08 ` Dan Williams
2007-04-02 14:13 ` Raz Ben-Jehuda(caro)
[not found] ` <17950.50209.580439.607958@notabene.brown>
[not found] ` <5d96567b0704161329n5c3ca008p56df00baaa16eacb@mail.gmail.com>
2007-04-19 8:28 ` Raz Ben-Jehuda(caro)
2007-04-19 9:20 ` Neil Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-11-18 14:05 Jure Pečar
2005-11-18 19:19 ` Dan Stromberg
2005-11-18 19:23 ` Mike Hardy
2005-11-19 4:40 ` Guy
2005-11-19 4:57 ` Mike Hardy
2005-11-19 5:54 ` Neil Brown
2005-11-19 11:59 ` Farkas Levente
2005-11-20 23:39 ` Neil Brown
2005-11-19 19:52 ` Carlos Carvalho
2005-11-20 19:54 ` Paul Clements
2005-11-19 5:56 ` Guy
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=17959.13415.960988.143833@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=raziebe@gmail.com \
/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).