1

I have a recent Macbook Pro. My processor is a: 2.4 GHz (i7-3630QM) quad-core Intel Core i7 Ivy Bridge with 6 MB on-chip L3 cache

I am running some cpu intensive programs, that each use "100%" of the cpu according to Activity monitor. They are very cpu intensive so will use all of the cpu time they can get. I ran 4 of these processes earlier, expecting my system to freeze while they were running and the CPU bar chart in Activity monitor to go to the top, however it says I'm only using 50% of my cpu power and my laptop is happily doing a bunch of other tasks as well!

Can anyone explain this? What does 100% mean in this context, and why are each of my processes only being given half of the time on the cpu when there is 50% of cpu time idle?

Thanks in advance

(Screen shot of activity monitor)

2
  • 2
    There are 2 threads/core and 4 cores -> "8 hardware execution contexts". So if each hardware execution context (or "core") can add up to 100% usage then 8x100 = 800. Also, this is better suited to the SuperUsers stack as it's not strictly programming related.
    – user2246674
    Commented Jun 14, 2013 at 22:58
  • Why would you expect your system to freeze? Commented Jun 15, 2013 at 8:03

1 Answer 1

3

CPU affinity and hyper-threading. CPU Affinity will make make tasks execute on different cores, so one program would be using 100%...Of one CPU. Hyper-threading makes the OS believe there are more cores than there actually are, so each of those 4 codes are hyper-thread-enabled. Therefore your process (100*4)*2 can go to 800%

1
  • That's how most cpu monitors work. This is the theoretical ideal. Hyperthreading uses the unused parts of a core to simultaneously execute a 2nd thread in the same core. ie. 1st thread is busy with a floating point multiplication, which leaves the value comparison (and all other parts) of the core unused, so a 2nd thread can use those parts while the 1st thread is busy. As you can imagine if you have lots of threads all wanting to do the same types of operations you barely benefit from this, but if there is variety it scales closer to 2x speed. On average I find 1.3x typical. Commented Jul 4, 2018 at 12:48

You must log in to answer this question.