mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kurt Garloff <garloff@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: dynamic sched timeslices
Date: Tue, 16 Mar 2004 12:36:15 +0100	[thread overview]
Message-ID: <20040316113615.GK4452@tpkurt.garloff.de> (raw)
In-Reply-To: <20040315154042.40c58c5b.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 1966 bytes --]

Hi Andrew,

On Mon, Mar 15, 2004 at 03:40:42PM -0800, Andrew Morton wrote:
> Kurt Garloff <garloff@suse.de> 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.
* Some people are unhappy that nice is not nice enough.

> In
> theory, the scheduler should magically tune itself to the current workload.

No, the computer can not take the decision whether a machine is sitting
in a machine room and mainly doing batch processing or whether it's used
by somebody sitting in front of it as workstation.

You can add heuristics and look at the load and sleep_avg of processes,
and scale timeslices dynamically, but these heuristics are IMVHO a very 
bad idea. They tend to break in subtle ways and disallow to reproduce
benchmark numbers etc.

I do know that the priorites do ensure that interactive processes have
some bonus, so even with long timeslices a system should be usable.
But heuristics fail and some situtaions with high load just can't be 
solved by such bonuses.

> If your patch is indeed necessary then this may point at a bug in the
> current CPU scheduler.

No, why should it? How should the computer know what the user wants if
he has no way to tell him?

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.

Regards,
-- 
Kurt Garloff  <garloff@suse.de>                            Cologne, DE 
SUSE LINUX AG, Nuernberg, DE                          SUSE Labs (Head)

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-03-16 11:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 22:42 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 [this message]
2004-03-16 13:13         ` Con Kolivas
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=20040316113615.GK4452@tpkurt.garloff.de \
    --to=garloff@suse.de \
    --cc=akpm@osdl.org \
    --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

all inboxes | Powered by JetHome®