• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3431
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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