top showing incorrect CPU and WCPU on amd64?

Laszlo Vitos vitos.laszlo at gmail.com
Fri Jun 3 06:43:46 GMT 2005


Hello,

I observed a strange behavior of top on FreeBSD 5.4-RELEASE on AMD64. It seems 
like the CPU and WCPU columns in top are an average over the running time of 
a process. A small test program confirmed this. It sleeps for 2 seconds, then 
goes over a few iterations of: hogs the cpu in a loop, then sleeps again for 
a few seconds.
The result: CPU and WCPU never reach 100%, nor 0%, they are growing/shrinking 
in small increments during the process' run time, depending on whether the 
process is sleeping or looping.
Attached is the test program. Can anyone confirm whether this is the expected 
behavior (and if so, why?)?

Thanks in advance,
laca


More information about the freebsd-amd64 mailing list