public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Herbert Poetzl <herbert@13thfloor.at>
Cc: Patrick Mau <mau@oscar.ping.de>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Workaround for wrapping loadaverage
Date: Wed, 10 Nov 2004 20:57:25 +1100	[thread overview]
Message-ID: <4191E605.1050401@kolivas.org> (raw)
In-Reply-To: <20041110062059.GA20467@mail.13thfloor.at>

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

Herbert Poetzl wrote:
> On Wed, Nov 10, 2004 at 08:49:41AM +1100, Con Kolivas wrote:
> 
>>Herbert Poetzl wrote:
>>
>>>but I agree that a higher resolution would be a good
>>>idea ... also doing the calculation when the number
>>>of running/uninterruptible processes has changed would
>>>be a good idea ...
>>
>>This could get very expensive. A modern cpu can do about 700,000 context 
>>switches per second of a real task with the current linux kernel so I'd 
>>suggest not doing this.
> 
> 
> hmm, right it can, do you have any stats about the
> 'typical' workload behaviour? 

How long is a piece of string? It depends entirely on your workload. On 
a desktop machine just switching applications pushes it to 10,000. 
Basically you end up making it an O(n) calculation by increasing the 
overhead of it (albeit small) proportionately to the context switch load 
which is usually significantly higher than the system load.

> do you know the average time between changes of 
> nr_running and nr_uninterruptible?

Same answer. Depends entirely on the workload and to whether your 
running tasks sleep at all or not (hint - most do). While it will be a 
lower number than the number of context switches, it potentially can be 
as high with just the right sort of threads (think server, network type 
stuff).

> TIA,
> Herbert

Cheers,
Con

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

  reply	other threads:[~2004-11-10  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08  0:19 Workaround for wrapping loadaverage Patrick Mau
2004-11-08  9:27 ` Andrew Morton
2004-11-08 10:25   ` Patrick Mau
2004-11-08 23:50     ` Andrew Morton
2004-11-09  0:43       ` Patrick Mau
2004-11-09 18:51         ` Herbert Poetzl
2004-11-09 21:49           ` Con Kolivas
2004-11-10  6:20             ` Herbert Poetzl
2004-11-10  9:57               ` Con Kolivas [this message]
2004-11-10  7:07           ` Nick Piggin
2004-11-10 23:31             ` Herbert Poetzl

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=4191E605.1050401@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@osdl.org \
    --cc=herbert@13thfloor.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mau@oscar.ping.de \
    /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