lkml.org 
[lkml]   [2002]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Strange load spikes on 2.4.19 kernel
On Sun, Oct 13, 2002 at 04:34:21PM +1000, Rob Mueller wrote:
> Also Let me do a calculation, though I have no idea if this is right or
> not...
> a) the first item in the uptime output is 'system load average for the last
> 1 minute'
> b) it seems to only update/recalculate every 5 seconds
> c) it jumps from < 1 to 20 in 1 interval (eg 5 seconds)
>
> This means that for it to jump from < 1 to 20 in 5 seconds, there must be on
> average about 60/5 * 20 = 240 processes blocked over those 5 seconds waiting
> for run time of some sort for the load to jump 20 points. Is that right?

Load is an exponential average, recalculated according to this formula
(see CALC_LOAD in sched.h) every five seconds:

load1 = load1 * exp + n * (1 - exp)

where exp = 1/exp(5sec/1min) ~= 1884/2048 ~= 0.92
n = the number of running tasks at the moment

To jump from 0.21 to 27.65 in 5 second (1 update), n would have to be
343. Wow. (Substituting the numbers for 5 and 15 minute averages I get
n of about 362 and 352).

Can somebody check my math?

Marius Gedminas
--
Never trust a computer you can't repair yourself.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [from the cache]
©2003-2011 Jasper Spaans