[Haifux] CPU usage percentage doesn't add up

Ohad Lutzky ohad at lutzky.net
Fri Feb 25 17:37:28 MSK 2011

Hello all,

A peer of mine is developing a multi-platform C++ application, and would
like to test the CPU usage difference of the application between Windows and
Linux. However, running `top` shows him that his single process is using 20%
CPU, whereas the total CPU usage is only 0.5%-2%. This is a quad-core
machine, so even dividing the 20% by 4 will give 5%, which is still far too
high. Windows gives him a satisfactory measurement of this statistic. Can
anyone here explain why this happens?

Man is the only animal that laughs and weeps, for he is the only animal that
is struck with the difference between what things are and what they ought to
 - William Hazlitt

Ohad Lutzky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://haifux.org/pipermail/haifux/attachments/20110225/4f6fb519/attachment.html 

More information about the Haifux mailing list