Why is it a method that uses over 100% of the CPU?

The explanation is explained in this post. Why does a process use more than 100% of the CPU?

CPU utilization percentages well above 100% can be achieved by running multiple instances of a service on a single server or in a multi-core environment. You can see nearly the same CPU numbers with the same loads and applications if you move from a dual processor to a quad processor in the same architecture.

The values you see will likely be a little misleading depending on how you check the CPU percent consumption. This is particularly true for servers with multiple CPU cores.

By default, commands like “top” will show a higher CPU consumption due to the way the calculation is done and the default attributes it uses.

The following is an excerpt from the man page of “top”:

1. %CPU  --  CPU Usage

In a true SMP environment, if a process is multi-threaded and top is not operating in Threads mode, amounts greater than 100% may be reported. 

You toggle Threads mode with the `H' interactive command.

Threaded processes’ CPU percent utilization will not be correctly displayed until “top” is updated to account for this.

Furthermore, using a multi-core framework can affect non-threaded tasks.

Also for multi-processor environments, if Irix mode is Off, top will operate in Solaris mode where a task's cpu usage will be divided by the total number of CPUs.  

You toggle Irix/Solaris modes with the `I' interactive command.

If your server has four CPU cores, the consumption registered with “Irix” mode enabled would be the total of all four cores.

Consider the following scenario:

Irix Mode is enabled.

Core 0 is equal to 20% of the total.

10 percent for Core 1

Core 2 (5% of total)

Core 3 (eight percent)

Total CPU Percentage Recorded = 43%

However, if Irix mode is disabled, CPU calculations will be much slower since they will be spread around all four CPU cores.

If you have a multi-core setup, switch off Irix mode while using “top” to track CPU percent utilization so that the readings are easier to understand across all cores.

An alternative source that also addresses this behavior can be found here.

In this tutorial, we have explained Why is a method uses over 100% of the CPU. For more information, you can visit our site.