public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Kurt Garloff <garloff@suse.de>
Cc: Andrew Morton <akpm@osdl.org>,
	hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: dynamic sched timeslices
Date: Wed, 17 Mar 2004 00:13:37 +1100	[thread overview]
Message-ID: <200403170013.38140.kernel@kolivas.org> (raw)
In-Reply-To: <20040316113615.GK4452@tpkurt.garloff.de>

On Tue, 16 Mar 2004 10:36 pm, Kurt Garloff wrote:
> On Mon, Mar 15, 2004 at 03:40:42PM -0800, Andrew Morton wrote:
> > Your patch didn't come with any subjective or measured testing results.

> We've done some measurements with 2.4 and O(1):
> * HZ=1000 cost about 1.5% perf. on a kernel compile (plus problems
>   with lost timer ticks)
> * Seting the scheduling timeslices from 1ms--30ms rather than 10ms thr
>   300ms cost another ~3% kernel compile performance
> * Depending on the workload the effect can be larger. Numbercrunching
>   would come to mind.

2.4 O(1) effects do not directly apply with 2.6

Dropping Hz will save you performance for sure on 2.6.

Changing the timeslices in 2.6 will be disappointing, though. Although the 
apparent timeslice of nice 0 tasks is 102ms, interactive tasks round robin at 
10ms. If you drop the timeslice to 10ms you will not improve the interactive 
feel but you will speed up expiration instead which will almost certainly 
worsen interactive feel. If you drop timeslices below 10ms you will get 
significant cache trashing and drop in performance (which your 2.4 results 
confirm).

Increasing timeslices does benefit pure number crunching workloads. The 
benchmarking I've done using cache intensive workloads (which are the most 
likely to benefit) show you are chasing diminishing returns, though. You can 
mathematically model them based on the fact that keeping a task bound to a 
cpu instead of shifting it to another cpu on SMP saves about 2ms processing 
time on P4. Suffice to say the benefit is only worth it if you do nothing but 
cpu intensive things, and becomes virtually insignificant beyond 200ms. On 
other architecture with longer cache decays you will benefit more; 
arch/i386/mach-voyager seems the longest at 20ms.

>It's a classical throughput vs. latency tradeoff and the patch allows
>the user to set it. I'm sure some people are willing to have long
>timeslices in order to gain 5% and don't care about the sched latencies.

As you can see from the above it is not that clear cut.

Con

  reply	other threads:[~2004-03-16 13:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 22:42 dynamic sched timeslices Kurt Garloff
2004-03-15 22:59 ` Christoph Hellwig
2004-03-15 23:09   ` Kurt Garloff
2004-03-15 23:40     ` Andrew Morton
2004-03-16 11:36       ` Kurt Garloff
2004-03-16 13:13         ` Con Kolivas [this message]
2004-03-16 14:29           ` Kurt Garloff
2004-03-16 20:45             ` Con Kolivas
2004-03-18  0:20               ` Kurt Garloff
2004-03-18  0:32                 ` Andrew Morton
2004-03-18  3:38                   ` Con Kolivas
2004-03-16 15:03 ` Timothy Miller
2004-03-16 15:08   ` Kurt Garloff
2004-03-23  9:23 ` Pavel Machek

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=200403170013.38140.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@osdl.org \
    --cc=garloff@suse.de \
    --cc=hch@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox