[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
/proc/loadavg Misleading on 2.2.14-12.
Hi,
I use uptime(1) quite a lot on a busy web server. This is really just
giving me numbers from /proc/loadavg. Most of the time they match well
how busy the machine is; the three numbers correlate with number of
hits, idle time in vmstat, etc.
However, when the machine gets really loaded, and vmstat's idle column
is zero for most of an hour I find /proc/loadavg reports a misleadingly
low figure for the last minute's average number of processes in the run
queue.
I know there are many httpds, mysqlds, etc., running and using strace I
can see they're very busy. So it isn't a case of one process consuming
all the CPU. vmstat shows many processes in the run queue too.
I've looked at timer.c:calc_load
http://lxr.linux.no/source/kernel/timer.c#L623
and the related /proc/loadavg read routine and I'm wondering if the
fixed point arithmetic used can lead to overflow or some over problem
in certain situations, which happen to match mine.
I'm also puzzled as to the addition of 0.05 in
http://lxr.linux.no/source/fs/proc/proc_misc.c#L86
Why? Is it a fudge factor? What's it for?
Thanks,
Ralph.
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.surriel.com/kernelnewbies.shtml