public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kalin KOZHUHAROV <kalin@thinrope.net>
To: Con Kolivas <kernel@kolivas.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Timothy Miller <miller@techsource.com>
Subject: Re: Nice 19 process still gets some CPU
Date: Tue, 29 Jun 2004 00:48:08 +0900	[thread overview]
Message-ID: <40E03DB8.5090204@thinrope.net> (raw)
In-Reply-To: <40E03844.1080000@kolivas.org>

Con Kolivas wrote:
> Timothy Miller wrote:
> |
> | Con Kolivas wrote:
> |
> |>
> |> It definitely should _not_ starve. That is the unixy way of doing
> |> things. Everything must go forward. Around 5% cpu for nice 19 sounds
> |> just right. If you want scheduling only when there's spare cpu cycles
> |> you need a sched batch(idle) implementation.
> |>
> |
> | Well, since I can't rewrite the app, I can't make it sched batch.  Nice
> | values are an easy thing to get at for anything that's running.
> |
> | Besides, comparing nice 0 to nice 19, I'd expect something more like a
> | 100:1 ratio or worse.  (That is, I don't expect nice to be linear.)
> |
> | Maybe this is just me, but when I set a process to the worst possible
> | priority (nice 19), I expect it only to run when nothing else needs the
> | CPU.
> 
> 
> Sched batch is a kernel modification, and a simple wrapper will allow
> you  to run _any_ program as sched batch without modifying it's source.
> 
> The design has had that ratio of 20:1 for a very long time so now is not
> the time to suddenly decide it should be different. However if you want
> to make it 100:1 for your machine feel free to edit kernel/sched.c
> and change
> #define MIN_TIMESLICE        ( 10 * HZ / 1000)
> to
> #define MIN_TIMESLICE        ( 1 * HZ / 1000)
> 
> That will give you more what you're looking for.

Cool!!!

As a start, I was palnning to ask such a question on LKML for a long time, but
somehow I always forget. Also running SETI@Home on a few Gentoo boxen, but with
stock kernels (now 2.6.7). Now that I started reading the first e-mail I thought
something like "Oh, so I _did_ send that mail?!?" :-)

I think I will check the suggested MIN_TIMESLICE thing on next recompile, but
it started me thinking...
Will it be very difficult to have /proc/sched/min_timeslice or something, instead of
the above compile-time define?
That will be really good thing for the our cases and souldn't (or am I overseeing
something) pose problems for "normal" usage. RFE!

BTW, the mentioned "sched batch kernel modification" is something else, right?
Google wasn't very usefull for "sched batch"...

Can you post any concrete pointers/patches for the sched batch modification?

Kalin.

-- 
||///_ o  *****************************
||//'_/>     WWW: http://ThinRope.net/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

  parent reply	other threads:[~2004-06-28 15:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-28 15:14 Nice 19 process still gets some CPU Timothy Miller
2004-06-28 15:04 ` Con Kolivas
2004-06-28 15:41   ` Timothy Miller
2004-06-28 15:24     ` Con Kolivas
2004-06-28 15:42       ` Richard B. Johnson
2004-06-28 15:47         ` Con Kolivas
2004-06-28 15:48       ` Kalin KOZHUHAROV [this message]
2004-06-28 15:51         ` Con Kolivas
2004-06-28 16:17     ` Chris Friesen
2004-06-28 16:23       ` Michael Buesch
2004-06-28 16:36         ` Chris Friesen
2004-06-28 21:15         ` Con Kolivas
2004-06-29 16:56   ` Kurt Garloff
2004-06-28 23:38 ` Peter Williams
2004-06-29  6:26 ` Benoît Dejean

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=40E03DB8.5090204@thinrope.net \
    --to=kalin@thinrope.net \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miller@techsource.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