lkml.org 
[lkml]   [2004]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Workaround for wrapping loadaverage
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.048 / U:25.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site