Bug#509215: 'top' doesn't report multi-core CPU usage properly w/ default kernel
Hardware: Dell Optiplex
CPU: Core 2 quad
OS: Lenny - fresh install ~Dec 15th
Testing configuration and report:
I have a pthreads based scientific application that uses ~170% and 250% CPU usage when running 2 and 3 threads, respectively. This behavior has been consistent on several systems, including MacOS and a previous version of Lenny. CPU usage was measured using 'top'.
On the freshly installed Lenny, 'top' reported between 70%-105% usage for both 2 and 3 threads. The time required for the application to complete was comparable to runtimes on MacOS and a previous version of Lenny (all using the same or similar CPUs).
I compiled a new kernel (18.104.22.168), basing it the config stored in /boot, incorporating minor additional changes. Under the newly compiled kernel, 'top' appears to report correct CPU usage. Application runtime remains the same.
It apperas that 'top' is reporting incorrect CPU usage on the default kernel. It is also possible that the multi-threading doesn't speed anything up in this application (very possible) and that the default kernel wasn't properly handling the threads, whereas 'top' is OK.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 22.214.171.124a (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash