All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Paolo Ciarrocchi <ciarrocchi@linuxmail.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Poor performance with 2.5.52, load and process in D state
Date: Mon, 23 Dec 2002 03:29:29 -0800	[thread overview]
Message-ID: <3E06F399.655E0005@digeo.com> (raw)
In-Reply-To: 20021222113754.15064.qmail@linuxmail.org

Paolo Ciarrocchi wrote:
> 
> From: Andrew Morton <akpm@digeo.com>
> > Paolo Ciarrocchi wrote:
> > >
> > > Hi all,
> > > I booted 2.5.52 with the following parmater:
> > > apm=off mem=32M (not sure about the amount, anyway I can reproduce
> > > the problem for sure with 32M and 40M)
> > >
> > > Then I tried the osdb (www.osdb.org) benchmark with
> > > 40M of data.
> > >
> > > $./bin/osdb-pg --nomulti
> > >
> > > the result is that aftwer a few second running top I see the postmaster
> > > process in D state and a lot if iowait.
> >
> > What exactly _is_ the issue?  The machine is achieving 25% CPU utilisation
> > in user code, 6-9% in system code.  It is doing a lot of I/O, and is
> > getting work done.
> 
> Ok, I'm back with the results of the osdb test against 2.4.19 and 2.5.52
> Both the kernel booted with apm=off mem=40M
> osdb ran with 40M of data.
> To summarize the results:
> 2.4.19 "Single User Test"       806.78 seconds  (0:13:26.78)
> 2.5.52 "Single User Test"       3771.85 seconds (1:02:51.85)
> 

I could reproduce this.

What's happening is that when the test starts up it does a lot of writing
which causes 2.4 to do a bunch of swapout.  So for the rest of the test
2.4 has an additional 8MB of cache available.

The problem of write activity causing swapout was fixed in 2.5.  It
does not swap out at all in this test.  But this time, we want it to.

End result: 2.4 has ~20 megabytes of cache for the test and 2.5 has ~12
megabytes.   The working pagecache set is around 16 MB, so we're right on
the edge - it makes 2.5 run 10x slower.  You can get most of this back by
boosting /proc/sys/vm/swappiness.  I think the default of 60 is too unswappy
really.  I run my machines at 80.

Tuning swappiness doesn't get all the performance back.  2.5's memory
footprint is generally larger - we still need to work that down.

If this was a real database server I'd expect that memory would end
up getting swapped out anyway.  But it doesn't happen in this test,
which is actually quite light in its I/O demands.

With mem=128m, 2.5 is 10% faster than 2.4.  Some of this is due to
the enhancements to copy_*_user() for poorly-aligned copies on Intel
CPUs.

  reply	other threads:[~2002-12-23 11:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-22 11:37 Poor performance with 2.5.52, load and process in D state Paolo Ciarrocchi
2002-12-23 11:29 ` Andrew Morton [this message]
2002-12-25 13:12   ` Denis Vlasenko
2002-12-25  8:41     ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2002-12-22 17:09 Paolo Ciarrocchi
2002-12-23 12:44 Paolo Ciarrocchi
2002-12-26  0:03 Paolo Ciarrocchi
2002-12-26  7:44 ` Andrew Morton
2002-12-26  9:26 Paolo Ciarrocchi
2002-12-26  9:34 ` Andrew Morton
2002-12-26  9:45 Paolo Ciarrocchi

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=3E06F399.655E0005@digeo.com \
    --to=akpm@digeo.com \
    --cc=ciarrocchi@linuxmail.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.