[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#509215: 'top' doesn't report multi-core CPU usage properly w/ default kernel



reassign 509215 linux-2.6
thanks

Keith Godfrey wrote:
> 
> 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 (2.6.27.10), 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. 

top parses /proc/stat, so it might either be that the data from it
is inconsistent in the 2.6.26 kernel or that top fails to parse
the output properly.

Could you compare the content of /proc/stat from both kernels?

Cheers,
        Moritz



Reply to: