More than 100% CPU in top in Linux/Mac

If you are power linux/mac user you should have noticed at least once that top shows more than 100% CPU for a process. I also have seen this multiple times but always wondered how it can be. Here is an example of how my top looked when I started my java and was doing some number crunching.

Recently I did a bit of research and got to the bottom of this. So here is the reason for it. A process is said to be using 100% CPU if it uses a processor to the limit that processor goes ie it completely uses that CPU without giving any idle/free time for that CPU. Now consider the situation that we have a multi core CPU. What if the process has more than one thread ? Well if so there is a chance that the threads can be split between two cores. So if 100% is one CPU running at maximum power, then what is one CPU at maximum power and other using 10% of its computing power? Its 100% + 10% = 110%. That’s how the magical more than 100% CPU value comes in.

It need not be the case that one CPU should be at 100% and another should be doing some other thread of the same process. It can be that two processes can be working 50% and 60% power which again would add up to 110%. The above image shows the 4 cores of my machine and it is clear that none of the processor is in 100%.  But if all  four cores execute a thread each the sum adds up to 104.3%

, , , ,

  1. #1 by on September 8, 2014 - 1:19 pm

    Thanks for your marvelous posting! I seriously enjoyed reading
    it, you will be a great author. I will be sure to bookmark
    your blog and will eventually come back down the road.
    I want to encourage continue your great posts, have
    a nice morning!

(will not be published)