kern/135823: 'top' shows wrong CPU usage for multithreaded
applications
Yuri
yuri at tsoft.com
Fri Jun 19 01:50:02 UTC 2009
>Number: 135823
>Category: kern
>Synopsis: 'top' shows wrong CPU usage for multithreaded applications
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jun 19 01:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Yuri
>Release: 72-STABLE
>Organization:
n/a
>Environment:
>Description:
I ran the program with 1500 threads and in top it looked the this:
>
> PID USERNAME THR PRI NICE SIZE RES STATE C TIME CPU COMMAND
> 20382 yuri 1500 99 0 641M 462M umtxn 0 0:00 19623.14% quicksort
> <skipped further>
>
I discussed this in freebsd-hackers@ and got this response from Dan Nelson:
<quote>
Top doesn't seem to show the right %CPU at all for threaded apps unless you
hit H to view each thread individually. Then you get accurate numbers (but
you have to manually sum up the threads usage if you want to see the total
%CPU for an entire process).
</quote>
This is a serious bug preventing user to see the very basic property of the running processes.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list