From: Ryan Cumming <bodnar42@phalynx.dhs.org>
To: Rene Rebe <rene.rebe@gmx.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [patch] O(1) scheduler, -D1, 2.5.2-pre9, 2.4.17
Date: Wed, 9 Jan 2002 07:34:39 -0800 [thread overview]
Message-ID: <E16OKkR-0001Km-00@phalynx> (raw)
In-Reply-To: <Pine.LNX.4.40.0201082057560.936-100000@blue1.dev.mcafeelabs.com> <Pine.LNX.4.33.0201091154440.2276-100000@localhost.localdomain> <20020109.121916.424252478.rene.rebe@gmx.net>
In-Reply-To: <20020109.121916.424252478.rene.rebe@gmx.net>
On January 9, 2002 03:19, Rene Rebe wrote:
> Could someone tell a non-kernel-hacker why this benchmark is nearly
> twice as fast when running reniced??? Shouldn't it be slower when it
> runs with lower priority (And you execute / type some commands during
> it)?
In addition for using the nice level as a priority hint, the new scheduler
also uses it as a hint of how "CPU-bound" a process it. Negative (higher
priority) nice levels give the process short, frequent timeslices. Positive
priorities give the process long, infrequent time slices. On an otherwise
(mostly) idle system, both processes will get the same amount of CPU time,
but distributed in a different way.
In applications that really don't care about interactivity, the long time
slice will increase their efficency greatly. In addition to having a fewer
context switches (and therefore less context switch overhead), the longer
time slices give them more time to warm up the cache. This has been referred
to as "batching", as the process is executing at once what would normally
take many shorter timeslices to complete.
So, what you're actually seeing is the reniced task not taking up more CPU
time (it's probably actually using slightly less), just using the CPU time
more efficently.
<worships Ingo>
-Ryan
next prev parent reply other threads:[~2002-01-09 15:35 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-07 20:24 [patch] O(1) scheduler, -D1, 2.5.2-pre9, 2.4.17 Ingo Molnar
2002-01-07 19:03 ` Brian Gerst
2002-01-07 21:19 ` Ingo Molnar
2002-01-09 3:39 ` Mike Kravetz
2002-01-09 5:05 ` Davide Libenzi
2002-01-09 3:32 ` Rusty Russell
2002-01-09 18:02 ` Davide Libenzi
2002-01-09 11:37 ` Ingo Molnar
2002-01-09 11:19 ` Rene Rebe
2002-01-09 15:34 ` Ryan Cumming [this message]
2002-01-09 18:24 ` Davide Libenzi
2002-01-09 21:24 ` Ingo Molnar
2002-01-09 19:38 ` Mike Kravetz
2002-01-10 18:21 ` Mike Kravetz
2002-01-10 19:08 ` Davide Libenzi
2002-01-10 19:09 ` Linus Torvalds
2002-01-10 21:08 ` Davide Libenzi
2002-01-10 19:15 ` Mike Kravetz
2002-01-10 20:05 ` Davide Libenzi
2002-01-09 22:34 ` Mark Hahn
2002-01-10 14:04 ` Ingo Molnar
2002-01-09 20:15 ` Linus Torvalds
2002-01-09 23:02 ` Ingo Molnar
2002-01-09 6:29 ` Brian
2002-01-09 6:40 ` Jeffrey W. Baker
2002-01-09 6:45 ` Ryan Cumming
2002-01-09 6:48 ` Ryan Cumming
2002-01-09 10:25 ` Ingo Molnar
2002-01-09 17:40 ` Mike Kravetz
[not found] <200201071922.g07JMN106760@penguin.transmeta.com>
2002-01-07 21:36 ` Ingo Molnar
2002-01-08 8:49 ` FD Cami
2002-01-08 18:44 ` J Sloan
2002-01-08 11:32 ` Anton Blanchard
2002-01-08 11:43 ` Anton Blanchard
2002-01-08 14:34 ` Ingo Molnar
2002-01-09 23:15 ` Anton Blanchard
2002-01-10 1:09 ` Richard Henderson
2002-01-10 17:04 ` Ivan Kokshaysky
2002-01-10 20:42 ` george anzinger
2002-01-10 23:56 ` Ingo Molnar
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=E16OKkR-0001Km-00@phalynx \
--to=bodnar42@phalynx.dhs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.rebe@gmx.net \
/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