Neither ps nor top report the correct amount of time used on an SMP
(procps-2.0.2 as delivered with RedHat 6.0). Instead, they report 1/Nth of the
time used, where N is the number of CPU's. This is a libproc.so problem. The
bug is that init_Hertz_value() in procps-2.0.2/proc/sysinfo.c calculates the
Hertz value as "Total number of Jiffies SInce Boot" / "Number of Seconds since
Boot". On an N processor machine you can get N*clock_interrupt rate Jiffies per
second. So on a 4-way Intel system, init_Hertz_value() incorrectly sets Hertz
to 400, as can be verified by doing a ps --info. The correct value should be
100, since a process can only be run on one cpu at a time. The fix is to divide
the ratio above by the number of CPU's. The kernel I am using is 2.2.9, but
that is pretty much irrelevent here, I think.
Best Regards,
Ray Bryant
[EMAIL PROTECTED]
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]