From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>, npiggin@suse.de
Subject: Re: Commit 31a12666d8f0c22235297e1c1575f82061480029 slows down Berkeley DB
Date: Tue, 3 Feb 2009 12:24:20 +1100 [thread overview]
Message-ID: <200902031224.20856.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20090130012315.GB19554@duck.suse.cz>
On Friday 30 January 2009 12:23:15 Jan Kara wrote:
> Hi,
>
> today I found that commit 31a12666d8f0c22235297e1c1575f82061480029 (mm:
> write_cache_pages cyclic fix) slows down operations over Berkeley DB.
> Without this "fix", I can add 100k entries in about 5 minutes 30s, with
> that change it takes about 20 minutes.
> What is IMO happening is that previously we scanned to the end of file,
> we left writeback_index at the end of file and went to write next file.
> With the fix, we wrap around (seek) and after writing some more we go
> to next file (seek again).
Hmm, but isn't that what pdflush has asked for? It is wanting to flush
some of the dirty data out of this file, and hence it wants to start
from where it last flushed out and then cycle back and flush more?
> Anyway, I think the original semantics of "cyclic" makes more sence, just
> the name was chosen poorly. What we should do is really scan to the end of
> file, reset index to start from the beginning next time and go for the next
> file.
Well, if we think of a file as containing a set of dirty pages (as it
appears to the high level mm), rather than a sequence, then behaviour
of my patch is correct (ie. there should be no distinction between dirty
pages at different offsets in the file).
However, clearly there is some problem with that assumption if you're
seeing a 4x slowdown :P I'd really like to know how it messes up the IO
patterns. How many files in the BDB workload? Are filesystem blocks
being allocated at the end of the file while writeout is happening?
Delayed allocation?
> I can write a patch to introduce this semantics but I'd like to hear
> opinions of other people before I do so.
I like dirty page cleaning to be offset agnostic as far as possible,
but I can't argue with numbers like that. Though maybe it would be
possible to solve it some other way.
next prev parent reply other threads:[~2009-02-03 1:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 1:23 Commit 31a12666d8f0c22235297e1c1575f82061480029 slows down Berkeley DB Jan Kara
2009-02-03 1:24 ` Nick Piggin [this message]
2009-02-03 1:54 ` Zhang, Yanmin
2009-02-03 2:11 ` Nick Piggin
2009-02-03 16:12 ` Chris Mason
2009-02-05 3:40 ` 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=200902031224.20856.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@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