Subject: Re: NetBSD-1.4: strange system load reports
To: Berndt Josef Wulf <wulf@ping.net.au>
From: Chris G. Demetriou <cgd@netbsd.org>
List: port-i386
Date: 06/15/1999 16:35:21
Berndt Josef Wulf <wulf@ping.net.au> writes:

> Chris G. Demetriou wrote
> > 
> > Berndt Josef Wulf <wulf@ping.net.au> writes:
> > > usually I'm not very concerned about the load averages on my system, but
> > > this seems to be rather strange....
> > > 
> > > After upgrading my workstation from NetBSD-1.3.3 to NetBSD-1.4-i386 I noticed 
> > > "uptime" reporting load averages > 2  for all three time intervalls whilst
> > > vmstat and top show idle times > 97%. The system is still very
> > > responsive and I wouldn't have noticed this if it wasn't for porting
> > > a program to NetBSD which makes use of the getloadavg() function.
> > > This all happens whilst the system is sitting idle with no major
> > > activity taking place.
> > 
> > I don't know why this would change between 1.3.3 and 1.4, but do you
> > have any processes in 'D' wait?  Those are counted as 'runnable' for
> > the purpose of calculating the load average.
> > 
> > However, your statement of "idle with no major activity" makes me
> > think you're not expecting to see any...
> 
> G'day,
> 
> thanks to all of you and in particular to Urban how put me onto the
> right track. The solution would have come sooner if I've had mentioned
> that the system had the KDE windows manager running. After killing
> off kaudioserver and maudio thinks improved a little. Nevertheless,
> system load still was > 1.
> 
> After terminating KDE and running XWindows using the twm windows manager
> things started to improve dramatically. System load is now < .20
> when idle - see below.
> 
> load averages:  0.18,  0.20,  0.18                            07:59:20
> 34 processes:  1 running, 33 sleeping
> CPU:  0.5% user,  0.0% nice,  0.5% system,  0.0% interrupt, 99.0% idle
> Memory: 15M Act 944K Inact 296K Wired 9176K Free 4K Swap 97M Swap free
> 
> I still don't know what causes KDE to place such a high load onto the
> system and my only hope is that this may improve on next release of
> KDE.

The issue here is that if the CPU is > 90% idle, ti's _not_ truly
placnig a high load on the system, it's placing a load on the system
which the system (because of sampling issues) interprets as a high
load.

It is possible, for instance, for 10 processes each of which only use
a _tiny_ bit of CPU to make the system report a load average of 10.


do you know what the KDE process is doing that causes it to be
runnable when the load average is being calculated?  If it's something
like the example der Mouse posted, yes, it'll raise the load average
but not significantly increase the actual load on the system.



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.