11

I checked the specs, and the i5-3427U CPU has 2 cores.

But the Activity Monitor shows 4 little charts for the CPU, so it looks like 4 cores.

Which is correct? Why does the Activity Monitor have 4 charts?

1

3 Answers 3

15

Your computer has 2 cores, but 4 logical processors. What you are seeing is Intel's hyper-threading technology. This technology puts multiple logical processors on a single core, so that each core can run multiple threads at once.

The difference between this and multiple cores is that hyper-threading only duplicates the parts of the processor which control the current state, not the actual execution unit, but multiple cores duplicate everything. This means that your computer will run like it has four cores only if the threads on each core are using different parts of the execution unit, but if the exact same thing was running on both threads in a single core, it wouldn't be any faster than a two-core system without hyper-threading.

2
  • Fascinating. What are the parts of the execution unit? Can it do 4 CPU intensive things at once, or just 2?
    – B Seven
    Commented Sep 30, 2012 at 5:02
  • 2
    The different parts are very processor dependent, and probably not public information. One interesting thing is that the more memory a process uses, the more efficient it is, because one processor can use the execution unit while the other is waiting on RAM.
    – ughoavgfhw
    Commented Sep 30, 2012 at 18:26
3

To find for sure how many cores you have is by opening a terminal (e.g via Spotlight and searching for Terminal) and then run

system_profiler | less

it'll dump out a bunch of info. Look for the category called "hardware" (which is close to the top of all the info) and an entry called "Total Number of Cores". There you will find your answer.

If you don't want to browse through all the output, a simple

system_profiler | grep 'Total Number of Cores'

gives you the result directly.

Or use the "About this Mac" (Apple icon in top left) > more info > system report, that shows how many cores you have.

2
  • @Borderline - better to ass this as an answer if you feel you can answer it better - thanks, D.
    – stuffe
    Commented Mar 25, 2013 at 11:19
  • @stuffe, how about this modification?
    – user44516
    Commented Mar 25, 2013 at 11:45
2

Here's a Terminal command that directly outputs how many cores you have:

sysctl hw.ncpu

If you care to distinguish between logical cores and physical cores, these are also available:

sysctl hw.physicalcpu
sysctl hw.logicalcpu

Source: https://stackoverflow.com/questions/1715580/how-to-discover-number-of-logical-cores-on-mac-os-x

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .