LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Ingo Molnar <mingo@elte.hu>, "LKML," <linux-kernel@vger.kernel.org>
Subject: Re: Poor PostgreSQL scaling on Linux 2.6.25-rc5 (vs 2.6.22)
Date: Wed, 12 Mar 2008 08:58:24 +0100 [thread overview]
Message-ID: <1205308704.8514.197.camel@twins> (raw)
In-Reply-To: <200803121221.37234.nickpiggin@yahoo.com.au>
On Wed, 2008-03-12 at 12:21 +1100, Nick Piggin wrote:
> (Back onto lkml)
>
> On Tuesday 11 March 2008 23:02, Ingo Molnar wrote:
> > another thing to try would be to increase:
> >
> > /proc/sys/kernel/sched_migration_cost
> >
> > from its 500 usecs default to a few msecs ?
>
> This doesn't really help either (at 10ms).
>
> (For the record, I've tried turning SD_WAKE_IDLE, SD_WAKE_AFFINE
> on and off for each domain and that hasn't helped either).
>
> I've also tried increasing sched_latency_ns as far as it can go.
> BTW. this is a pretty nasty behaviour if you ask my opinion. It
> starts *increasing* the number of involuntary context switches
> as resources get oversubscribed. That's completely unintuitive as
> far as I can see -- when we get overloaded, the obvious thing to
> do is try to increase efficiency, or at least try as hard as
> possible not to lose it. So context switches should be steady or
> decreasing as I add more processes to a runqueue.
>
> It seems to max out at nearly 100 context switches per second,
> and this has actually shown to be too frequent for modern CPUs
> and big caches.
>
> Increasing the tunable didn't help for this workload, but it really
> needs to be fixed so it doesn't decrease timeslices as the number
> of processes increases.
/proc/sys/kernel/sched_min_granularity_ns
/proc/sys/kernel/sched_latency_ns
period := max(latency, nr_running * min_granularity)
slice := period * w_{i} / W
W := \Sum_{i} w_{i}
So if you want to increase the slice length for loaded systems, up
min_granularity.
next prev parent reply other threads:[~2008-03-12 7:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 6:49 Nick Piggin
2008-03-11 7:58 ` Ingo Molnar
2008-03-11 8:28 ` Nick Piggin
2008-03-11 9:59 ` Ingo Molnar
2008-03-11 21:07 ` Nicholas Miell
2008-03-11 21:34 ` Cyrus Massoumi
2008-03-11 23:12 ` Nicholas Miell
2008-03-11 23:42 ` Nick Piggin
2008-03-11 23:47 ` Stephen Hemminger
2008-03-12 9:00 ` Zhang, Yanmin
[not found] ` <20080311102538.GA30551@elte.hu>
[not found] ` <20080311120230.GA5386@elte.hu>
2008-03-12 1:21 ` Nick Piggin
2008-03-12 7:58 ` Peter Zijlstra [this message]
2008-03-17 0:44 ` Nick Piggin
2008-03-17 5:16 ` Ray Lee
2008-03-17 5:21 ` Willy Tarreau
2008-03-17 7:19 ` Nick Piggin
2008-03-17 8:26 ` Willy Tarreau
2008-03-17 8:54 ` Nick Piggin
2008-03-17 9:28 ` Peter Zijlstra
2008-03-17 9:56 ` Nick Piggin
2008-03-17 10:16 ` Ingo Molnar
2008-03-17 5:34 ` Nick Piggin
2008-03-14 15:42 Xose Vazquez Perez
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=1205308704.8514.197.camel@twins \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--subject='Re: Poor PostgreSQL scaling on Linux 2.6.25-rc5 (vs 2.6.22)' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).