Bug 27334

Summary: load average constantly above 1.0, even when idle
Product: Base System Reporter: Seth <seth>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   

Description Seth 2001-05-15 15:10:02 UTC
This sounds similar to kern/21155, but occurs in -STABLE rather than
-CURRENT.  It didn't happen on my old system (a dual-proc ppro 200), but
there are so many differences: smp, 4.0 (vs -stable) that it's not a good
comparison.

Nothing seems to be affected, but any programs that rely on load average to
determine whether or not to take or suspend action will be affected.  This
is why I made this report a medium priority.

A quick snapshot from top:

last pid:  1729;  load averages:  1.00,  1.00,  1.00    up 0+11:41:00  09:58:15
40 processes:  1 running, 39 sleeping
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Mem: 12M Active, 39M Inact, 21M Wired, 60K Cache, 35M Buf, 177M Free
Swap: 512M Total, 512M Free

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
 1729 seth      28   0  1892K  1172K RUN      0:00  1.08%  0.20% top
 1367 root       2   0  2272K  1892K select   0:01  0.00%  0.00% sshd
 1348 root       2   0  2232K  1852K select   0:01  0.00%  0.00% sshd
  158 root       2 -12  1256K   844K select   0:00  0.00%  0.00% ntpd
 1356 seth       2   0  2152K  1876K select   0:00  0.00%  0.00% epic-EPIC4-1.0
 1354 seth       2   0  1568K  1256K select   0:00  0.00%  0.00% screen


(there's more, but those are the top 6.)

How-To-Repeat:   run top or uptime, check load average.
Comment 1 iedowse 2001-05-15 16:40:23 UTC
In message <20010515140113.D071672501@psychotic.aberrant.org>, seth@psychotic.a
berrant.org writes:
>
>This sounds similar to kern/21155, but occurs in -STABLE rather than
>-CURRENT.  It didn't happen on my old system (a dual-proc ppro 200), but
>there are so many differences: smp, 4.0 (vs -stable) that it's not a good
>comparison.

Hi, could you try downloading

	http://www.maths.tcd.ie/~iedowse/FreeBSD/loadps.tgz

and extracting the tarfile somewhere (/tmp or whatever). Then in the
"loadps" directory, type:

	make
	./loadps axlww

This should show up all processes that are currently contributing to
the load average. That should at least begin to narrow down what
is causing these phantom load effects.

(loadps is a normal -STABLE ps with a small adjustment that causes it
see only processes that are contributing to the load average - this
logic is copied from loadav() in sys/vm/vm_meter.c).

Ian
Comment 2 Seth 2001-05-15 16:42:53 UTC
Ian,

Thanks.  Here's the output:

psychotic 514: ./loadps axlww; uptime
  UID   PID  PPID CPU PRI NI   VSZ  RSS WCHAN  STAT  TT       TIME COMMAND
    0     0     0   0 -18  0     0    0 sched  DLs   ??    0:00.00  (swapper)
    0     4     0   0 -18  0     0    0 psleep DL    ??    0:00.08  (bufdaemon)
 1000  1994  1725   1  28  0  1084  616 -      R+    p3    0:00.00 ./loadps axlww
11:42AM  up 13:24, 4 users, load averages: 1.06, 1.03, 1.01


Seth.

On Tue, May 15, 2001 at 04:40:23PM +0100, Ian Dowse wrote:
> In message <20010515140113.D071672501@psychotic.aberrant.org>, seth@psychotic.a
> berrant.org writes:
> >
> >This sounds similar to kern/21155, but occurs in -STABLE rather than
> >-CURRENT.  It didn't happen on my old system (a dual-proc ppro 200), but
> >there are so many differences: smp, 4.0 (vs -stable) that it's not a good
> >comparison.
> 
> Hi, could you try downloading
> 
> 	http://www.maths.tcd.ie/~iedowse/FreeBSD/loadps.tgz
> 
> and extracting the tarfile somewhere (/tmp or whatever). Then in the
> "loadps" directory, type:
> 
> 	make
> 	./loadps axlww
> 
> This should show up all processes that are currently contributing to
> the load average. That should at least begin to narrow down what
> is causing these phantom load effects.
> 
> (loadps is a normal -STABLE ps with a small adjustment that causes it
> see only processes that are contributing to the load average - this
> logic is copied from loadav() in sys/vm/vm_meter.c).
> 
> Ian
Comment 3 iedowse freebsd_committer freebsd_triage 2001-11-15 01:05:13 UTC
State Changed
From-To: open->closed


This is believed to be caused by synchronisation between some system 
processes and the samples that are used to compute the load avarage. 
Revision 1.87.2.4 of kern_synch.c and assiciated changes should  
fix this; please let us know if the problem continues to occur so 
that the PR can be re-opened if necessary.