From: Linus Torvalds <torvalds@linux-foundation.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Dave Jones <davej@redhat.com>,
tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: Change in default vm_dirty_ratio
Date: Wed, 20 Jun 2007 11:28:01 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.98.0706201119410.3593@woody.linux-foundation.org> (raw)
In-Reply-To: <1182363174.2701.2.camel@laptopd505.fenrus.org>
On Wed, 20 Jun 2007, Arjan van de Ven wrote:
>
> maybe that needs to be fixed? If you stopped dirtying after the initial
> bump.. is there a reason for the kernel to dump all that data to the
> disk in such a way that it disturbs interactive users?
No. I would argue that the kernel should try to trickle things out, so
that it doesn't disturb anything, and a "big dump" becomes a "steady
trickle".
And that's what "vm_dirty_ratio" is all about.
> so the question maybe is.. is the vm tunable the cause or the symptom of
> the bad experience?
No, the vm tunable is exactly what it's all about.
Do a big "untar", and what you *want* to see is not "instant dump,
followed by long pause".
A much *smoother* behaviour is generally preferable, and most of the time
that's true even if it may be lower throughput in the end!
Of course, "synchronous writes" are *really* smooth (you never allow any
dumps at *all* to build up), so this is about a balance - not about
"perfect smoothness" vs "best throughput", but about a heuristic that
finds a reasonable middle ground.
There is no "perfect". There is only "stupid heuristics". Maybe the
"vm_dirty_ratio" is a bit *too* stupid, but it definitely is needed in
some form.
It can actually be more than just a "performance" vs "smoothness" issue:
the 40% thing was actually a *correctness* issue too, back when we coutned
it as a percentage of total memory. A highmem machine would allow 40% of
all memory free and it was all in low memory, and that literally caused
lockups.
So the dirty_ratio is not *only* about smoothness, it's also simply about
the fact that the kernel must not allow too much memory to be dirtied,
because that leads to out-of-memory deadlocks and other nasty issues. So
it's not *purely* a tunable.
Linus
next prev parent reply other threads:[~2007-06-20 18:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-18 21:14 Tim Chen
2007-06-18 23:47 ` Andrew Morton
2007-06-19 0:06 ` Linus Torvalds
2007-06-19 0:09 ` Arjan van de Ven
2007-06-19 18:41 ` John Stoffel
2007-06-19 19:04 ` Linus Torvalds
2007-06-19 19:06 ` Linus Torvalds
2007-06-19 22:33 ` David Miller
2007-06-19 19:57 ` Andi Kleen
2007-06-20 4:24 ` Dave Jones
2007-06-20 4:44 ` Andrew Morton
2007-06-20 8:35 ` Peter Zijlstra
2007-06-20 8:58 ` Andrew Morton
2007-06-20 9:14 ` Jens Axboe
2007-06-20 9:19 ` Peter Zijlstra
2007-06-20 9:20 ` Jens Axboe
2007-06-20 9:43 ` Peter Zijlstra
2007-06-21 22:53 ` Matt Mackall
2007-06-21 23:08 ` Linus Torvalds
2007-06-23 18:23 ` Peter Zijlstra
2007-06-24 16:40 ` Linus Torvalds
2007-06-25 0:15 ` Peter Zijlstra
2007-06-20 9:19 ` Peter Zijlstra
2007-06-21 16:54 ` Mark Lord
2007-06-21 16:55 ` Peter Zijlstra
2007-06-20 17:17 ` Linus Torvalds
2007-06-20 18:12 ` Arjan van de Ven
2007-06-20 18:28 ` Linus Torvalds [this message]
2007-06-21 12:37 ` Nadia Derbey
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=alpine.LFD.0.98.0706201119410.3593@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tim.c.chen@linux.intel.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®