Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3425
  • Last Modified:

%CPU over 100 in top under linux

Hi,

I'm working on a multithreaded application, in C++, using the ACE framework for TCP and threads.

When used in certain conditions, the application can have up to 400 threads running. All those threads are running a loop with several operations and a sleep of 100 milliseconds.

When used in the worst conditions, top sometimes shows %CPU > 100 (up to 533).
I don't understand this result. Can someone explain how this is possible (how the %CPU is computed to get over 100%) ? Is related to the number of threads ?

Thanks
0
KCTeam
Asked:
KCTeam
2 Solutions
 
from_expCommented:
please show me top output and
cat /proc/cpuinfo

I think you have multi processor (or multicore) system
0
 
ravenplCommented:
If You have 4 cores(cpus) You can reada 400% CPU time usage. And so on.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now