How can my computer use 300% PC processing power?

How can my computer use 300% PC processing power?

I'm playing around with a script and well I got carried away (it's still running right now and yet my computer has not yet died). I'm running 17 iterations of the script (with the intention of crashing my computer).

Looking at the activity monitor I see that each Python process has a unique pid and that they seem to take up about 17-20% of my processing power each... How is that possible? Did my computer magically grow 200% power and break the laws of thermodynamics somewhere?

Enter image description here

答案1

On OS X, like other *nixes, CPU load is measured per virtual processor core. If you have multiple - you can have 200% and more combined under full load.

This is different from Windows and maybe some other systems, where CPU load is calculated per entire CPU (or CPUs - I do not remember how it behaves when having multiple physical processors).

答案2

OS X and Linux and possibly other UNIX operating systems (or rather the most common tools on these systems) display CPU usage differently from Windows. On Windows 100% means “all CPU resources used”. On Linux, it means that one “thread” (as in Hyper-threading) is completely busy. As such, it can reach up to (Number of Threads per Core) * (Number of Cores per CPU) * (Number of CPUs) in total.

Although not entirely related, another interesting fact: Windows 10 further normalizes CPU usage using the CPU’s current throttling state. So a 2 GHz CPU running throttled at 1 GHz will only be up to 50% busy.

答案3

As already pointed out in several answers, Mac shows the CPU percentage of each process as 'percentage of one core' so you should divide that by the number of cores [including HT as 'double']

If you're uncertain as to how many virtual cores you have, Cmd ⌘ 3 will bring up Activity Monitor's CPU History pane, where you can simply count the stripes ;)

enter image description here

Directly below where you chopped off the image is the information you need to quickly determine actual total usage for System:, User: & Idle: Therein lies your simple total to 100%

enter image description here

答案4

Activity monitor doesn't actually measure the processing power each app/process uses, it just estimates it using an algorithm. So it can be inaccurate...

Also, as @Vasfed points out, CPU consumption is measured per processor core. Multiple cores can mean higher than 100% usage...

A geek occasionally stumbles upon this phenomenon and is flabbergasted until a Superuser comes to his aid... ;D

相关内容