public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
	Jan Kara <jack@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	npiggin@suse.de
Subject: Re: Commit 31a12666d8f0c22235297e1c1575f82061480029 slows down Berkeley DB
Date: Tue, 03 Feb 2009 11:12:45 -0500	[thread overview]
Message-ID: <1233677565.7246.15.camel@think.oraclecorp.com> (raw)
In-Reply-To: <200902031311.02378.nickpiggin@yahoo.com.au>

On Tue, 2009-02-03 at 13:11 +1100, Nick Piggin wrote:
> On Tuesday 03 February 2009 12:54:26 Zhang, Yanmin wrote:
> > On Tue, 2009-02-03 at 12:24 +1100, Nick Piggin wrote:
> > > 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).
> >
> > We also found this commit causes about 40~50% regression with iozone
> > mmap-rand-write. #iozone -B -r 4k -s 64k -s 512m -s 1200m
> >
> > My machine has 8GB memory.
> 
> Ah, thanks. Yes BDB I believe is basically just doing an mmap-rand-write,
> so maybe this is a good test case.
> 
> The interesting thing is why is this causing such a slowdown. If there is
> only a single main file active in the workload, then I don't see why this
> patch should make such a big difference. In either case, wouldn't pdflush
> come back and just start writing out from the start of the file anyway?

Perhaps the difference is that without the patch, pdflush will return
after running congestion_wait()?  This would give bdb and iozone a
chance to fill in more pages, and increases the chances we'll do
sequential IO.

-chris



  reply	other threads:[~2009-02-03 17:59 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
2009-02-03  1:54   ` Zhang, Yanmin
2009-02-03  2:11     ` Nick Piggin
2009-02-03 16:12       ` Chris Mason [this message]
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=1233677565.7246.15.camel@think.oraclecorp.com \
    --to=chris.mason@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=npiggin@suse.de \
    --cc=yanmin_zhang@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