From: Miquel van Smoorenburg <miquels@cistron.nl>
To: Nick Piggin <piggin@cyberone.com.au>
Cc: Miquel van Smoorenburg <miquels@cistron.nl>,
Jens Axboe <axboe@suse.de>, Andrew Morton <akpm@osdl.org>,
linux-lvm@sistina.com, linux-kernel@vger.kernel.org,
thornber@redhat.com
Subject: Re: IO scheduler, queue depth, nr_requests
Date: Fri, 20 Feb 2004 00:53:03 +0100 [thread overview]
Message-ID: <20040219235303.GI32263@drinkel.cistron.nl> (raw)
In-Reply-To: <40353E30.6000105@cyberone.com.au> (from piggin@cyberone.com.au on Thu, Feb 19, 2004 at 23:52:32 +0100)
On Thu, 19 Feb 2004 23:52:32, Nick Piggin wrote:
>
>
> Miquel van Smoorenburg wrote:
>
> >On Thu, 19 Feb 2004 11:19:15, Jens Axboe wrote:
> >
> >>On Thu, Feb 19 2004, Miquel van Smoorenburg wrote:
> >>
> >>
> >>>>Shouldn't the controller itself be performing the insertion?
> >>>>
> >>>Well, you would indeed expect the 3ware hardware to be smarter than
> >>>that, but in its defence, the driver doesn't set sdev->simple_tags or
> >>>sdev->ordered_tags at all. It just has a large queue on the host, in
> >>>hardware.
> >>>
> >>A too large queue. IMHO the simple and correct solution to your problem
> >>is to diminish the host queue (sane solution), or bump the block layer
> >>queue size (dumb solution).
> >>
> >
> >Well, I did that. Lowering the queue size of the 3ware controller to 64
> >does help a bit, but performance is still not optimal - leaving it at 254
> >and increasing the nr_requests of the queue to 512 helps the most.
> >
> >But the patch I posted does just as well, without any tuning. I changed
> >it a little though - it only has the "new" behaviour (instead of blocking
> >on allocating a request, allocate it, queue it, _then_ block) for WRITEs.
> >That results in the best performance I've seen, by far.
> >
> >
>
> That's because you are half introducing per-process limits.
>
> >Now the style of my patch might be ugly, but what is conceptually wrong
> >with allocating the request and queueing it, then block if the queue is
> >full, versus blocking on allocating the request and keeping a bio
> >"stuck" for quite some time, resulting in out-of-order requests to the
> >hardware ?
> >
> >
>
> Conceptually? The concept that you have everything you need to
> continue and yet you block anyway is wrong.
For reading, I agree. For writing .. ah well, English is not my first
language, let's not argue about language semantics.
> >Note that this is not an issue of '2 processes writing to 1 file', really.
> >It's one process and pdflush writing the same dirty pages of the same file.
>
> pdflush is a process though, that's all that matters.
I understand that when the two processes are unrelated, the patch as I
sent it will do the wrong thing.
But the thing is, you get this:
- "dd" process writes requests
- pdflush triggers to write dirty pages
- too many pages are dirty so "dd" blocks as well to write synchronously
- "dd" process triggers "queue full" but gets marked as "batching" so
can continue (get_request)
- pdflush tries to submit one bio and gets blocked (get_request_wait)
- "dd" continues, but that one bio from pdflush remains stuck for a while
That's stupid, that one bio from pdflush should really be allowed on
the queue, since "dd" is adding requests from the same source to it
anyway.
Perhaps writes from pdflush should be handled differently to prevent
this specific case ?
Say, if pdflush adds request #128, don't mark it as batching, but
let it block. The next process will be the one marked as batching
and can continue. If pdflush tries to add a request > 128, allow it,
but _then_ block it.
Would something like that work ? Would it be a good idea to never mark
a pdflush process as batching, or would that have a negative impact
for some things ?
Mike.
next prev parent reply other threads:[~2004-02-19 23:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040216131609.GA21974@cistron.nl>
[not found] ` <20040216133047.GA9330@suse.de>
[not found] ` <20040217145716.GE30438@traveler.cistron.net>
2004-02-18 23:52 ` Miquel van Smoorenburg
2004-02-19 1:24 ` Nick Piggin
2004-02-19 1:52 ` Miquel van Smoorenburg
2004-02-19 2:01 ` Nick Piggin
2004-02-19 1:26 ` Andrew Morton
2004-02-19 2:11 ` Miquel van Smoorenburg
2004-02-19 2:26 ` Andrew Morton
2004-02-19 10:15 ` Miquel van Smoorenburg
2004-02-19 10:19 ` Jens Axboe
2004-02-19 20:59 ` Miquel van Smoorenburg
2004-02-19 22:52 ` Nick Piggin
2004-02-19 23:53 ` Miquel van Smoorenburg [this message]
2004-02-20 0:15 ` Nick Piggin
2004-02-20 1:12 ` [PATCH] per process request limits (was Re: IO scheduler, queue depth, nr_requests) Nick Piggin
2004-02-20 1:26 ` Andrew Morton
2004-02-20 1:40 ` Nick Piggin
2004-02-20 2:32 ` Andrew Morton
2004-02-20 14:40 ` [PATCH] bdi_congestion_funp (was: Re: [PATCH] per process request limits (was Re: IO scheduler, queue depth, nr_requests)) Miquel van Smoorenburg
2004-02-20 14:57 ` Jens Axboe
2004-02-20 14:59 ` Joe Thornber
2004-02-20 15:00 ` Jens Axboe
2004-02-22 14:02 ` Miquel van Smoorenburg
2004-02-22 19:55 ` Andrew Morton
2004-02-20 1:45 ` [PATCH] per process request limits (was Re: IO scheduler, queue depth, nr_requests) Nick Piggin
2004-02-19 2:51 ` IO scheduler, queue depth, nr_requests Nick Piggin
2004-02-19 10:21 ` Jens Axboe
[not found] <1qJVx-75K-15@gated-at.bofh.it>
[not found] ` <1qJVx-75K-17@gated-at.bofh.it>
[not found] ` <1qJVw-75K-11@gated-at.bofh.it>
[not found] ` <1qLb8-6m-27@gated-at.bofh.it>
[not found] ` <1qLXl-XV-17@gated-at.bofh.it>
[not found] ` <1qMgF-1dA-5@gated-at.bofh.it>
[not found] ` <1qTs3-7A2-51@gated-at.bofh.it>
[not found] ` <1qTBB-7Hh-7@gated-at.bofh.it>
[not found] ` <1r3AS-1hW-5@gated-at.bofh.it>
[not found] ` <1r5jD-2RQ-31@gated-at.bofh.it>
[not found] ` <1r6fH-3L8-11@gated-at.bofh.it>
[not found] ` <1r6S4-6cv-1@gated-at.bofh.it>
2004-02-25 20:17 ` Bill Davidsen
2004-02-25 21:39 ` Miquel van Smoorenburg
2004-02-26 0:39 ` Nick Piggin
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=20040219235303.GI32263@drinkel.cistron.nl \
--to=miquels@cistron.nl \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-lvm@sistina.com \
--cc=piggin@cyberone.com.au \
--cc=thornber@redhat.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
all inboxes | Powered by JetHome®