From: Andrew Morton <akpm@osdl.org>
To: David Chinner <dgc@sgi.com>
Cc: Neil Brown <neilb@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: RFC - how to balance Dirty+Writeback in the face of slow writeback.
Date: Thu, 17 Aug 2006 23:29:42 -0700 [thread overview]
Message-ID: <20060817232942.c35b1371.akpm@osdl.org> (raw)
In-Reply-To: <20060818001102.GW51703024@melbourne.sgi.com>
On Fri, 18 Aug 2006 10:11:02 +1000
David Chinner <dgc@sgi.com> wrote:
>
> > Something like that covers the global dirty+writeback problem. The other
> > major problem space is the multiple-backing-device problem:
> >
> > a) One device is being written to heavily, another lightly
> >
> > b) One device is fast, another is slow.
>
> Once we are past the throttling threshold, the only thing that
> matters is whether we can write more data to the backing device(s).
> We should not realy be allowing the input rate to exceed the output
> rate one we are passed the throttle threshold.
True.
But it seems really sad to block some process which is doing a really small
dirtying (say, some dopey atime update) just because some other process is
doing a huge write.
Now, things _usually_ work out all right, if only because of
balance_dirty_pages_ratelimited()'s logic. But it's more by happenstance
than by intent, and these sorts of interferences can happen.
> > To solve this properly we'd need to account for
> > dirty+writeback(+unstable?) pages on a per-backing-dev basis.
>
> We'd still need to account for them globally because we still need
> to be able to globally limit the amount of dirty data in the
> machine.
>
> FYI, I implemented a complex two-stage throttle on Irix a couple of
> years ago - it uses a per-device soft throttle threshold that is not
> enforced until the global dirty state passes a configurable limit.
> At that point, the per-device limits are enforced.
>
> This meant that devices with no dirty state attached to them could
> continue to dirty pages up to their soft-threshold, whereas heavy
> writers would be stopped until their backing devices fell back below
> the soft thresholds.
>
> Because the amount of dirty pages could continue to grow past safe
> limits if you had enough devices, there is also a global hard limit
> that cannot be exceeded and this throttles all incoming write
> requests regardless of the state of the device it was being written
> to.
>
> The problem with this approach is that the code was complex and
> difficult to test properly. Also, working out the default config
> values was an exercise in trial, error, workload measurement and
> guesswork that took some time to get right.
>
> The current linux code works as well as that two-stage throttle
> (better in some cases!) because of one main thing - bound request
> queue depth with feedback into the throttling control loop. Irix
> has neither of these so the throttle had to provide this accounting
> and limiting (soft throttle threshold).
>
> Hence I'm not sure that per-backing-device accounting and making
> decisions based on that accounting is really going to buy us much
> apart from additional complexity....
>
hm, interesting.
It seems that the many-writers-to-different-disks workloads don't happen
very often. We know this because
a) The 2.4 performance is utterly awful, and I never saw anybody
complain and
b) 2.6 has the risk of filling all memory with under-writeback pages,
and nobdy has complained about that either (iirc).
Relying on that observation and the request-queue limits has got us this
far but yeah, we should plug that PageWriteback windup scenario.
btw, Neil, has the Pagewriteback windup actually been demonstrated? If so,
how?
next prev parent reply other threads:[~2006-08-18 6:29 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 23:40 Neil Brown
2006-08-15 8:06 ` Andrew Morton
2006-08-15 23:00 ` David Chinner
2006-08-17 4:08 ` Neil Brown
2006-08-17 6:14 ` Andrew Morton
2006-08-17 12:36 ` Trond Myklebust
2006-08-17 15:14 ` Andrew Morton
2006-08-17 16:22 ` Trond Myklebust
2006-08-18 5:49 ` Andrew Morton
2006-08-18 10:43 ` Nikita Danilov
2006-08-18 0:11 ` David Chinner
2006-08-18 6:29 ` Andrew Morton [this message]
2006-08-18 7:03 ` Jens Axboe
2006-08-18 7:11 ` Andrew Morton
2006-08-18 18:57 ` Andi Kleen
2006-08-21 0:35 ` Neil Brown
2006-08-21 3:15 ` David Chinner
2006-08-21 7:24 ` Neil Brown
2006-08-21 13:51 ` Jens Axboe
2006-08-25 4:36 ` Neil Brown
2006-08-25 6:37 ` Jens Axboe
2006-08-28 1:28 ` David Chinner
2006-08-25 13:16 ` Trond Myklebust
2006-08-27 8:21 ` Neil Brown
2006-08-21 14:28 ` David Chinner
2006-08-25 5:24 ` Neil Brown
2006-08-28 1:55 ` David Chinner
2006-08-21 7:47 ` Andi Kleen
2006-08-18 7:07 ` Neil Brown
2006-08-17 22:17 ` David Chinner
2006-08-17 3:59 ` Neil Brown
2006-08-17 6:22 ` Andrew Morton
2006-08-17 8:36 ` Jens Axboe
2006-08-17 13:21 ` Trond Myklebust
2006-08-17 15:30 ` Andrew Morton
2006-08-17 16:18 ` Trond Myklebust
2006-08-18 5:34 ` Andrew Morton
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=20060817232942.c35b1371.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=dgc@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/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®