How many cores does my Mac have?

49

11

I am confused, because when I see my mac about window, I see

enter image description here

That I have 1 Processor and 4 cores. But when I run htop, I see 8 cores

enter image description here

What am I missing?

daydreamer

Posted 2016-07-15T15:45:26.193

Reputation: 805

Answers

38

What am I missing?

Hyperthreading. You have 4 physical cores, but 8 logical ones.

For each processor core that is physically present, the operating system addresses two virtual (logical) cores and shares the workload between them when possible.

See also the Intel data on your processor, the i7 4870HQ:

# of Cores 4

Cores is a hardware term that describes the number of independent central processing units in a single computing component (die or chip).

# of Threads 8

A Thread, or thread of execution, is a software term for the basic ordered sequence of instructions that can be passed through or processed by a single CPU core.

Daniel Beck

Posted 2016-07-15T15:45:26.193

Reputation: 98 421

84

From a terminal you can see the difference between the number of physical processors and logical processors using sysctl:

$ sysctl hw.physicalcpu hw.logicalcpu
hw.physicalcpu: 4
hw.logicalcpu: 8

CortexCompiler

Posted 2016-07-15T15:45:26.193

Reputation: 1 015

5Why was this downvoted ? This command works (at least on El Capitan). – Gabriel Devillers – 2018-10-29T11:43:25.460

4

your CPU is an i7, so it has Hyperthreading, which presents itself to system monitoring applications by doubling the number of cores, since each can process two threads semi-simultaneously.

Frank Thomas

Posted 2016-07-15T15:45:26.193

Reputation: 29 039

3

What you see are so called hyperthreaded cores.

For each physical core there are two hyperthreaded (or logical) cores, you can read up more about hyperthreading here

Yamakaja

Posted 2016-07-15T15:45:26.193

Reputation: 467

1Lol, answer flood (My answer was first btw ... :) ) – Yamakaja – 2016-07-15T15:53:14.217

0

It has 4 physical cores and 4 logical cores giving you the total of 8 cores.

This is called Hyper-threading

Cole

Posted 2016-07-15T15:45:26.193

Reputation: 346

4This is wrong. There are 4 physical cores, and each physical core has two logical cores. So there are 8 logical cores. – Yongwei Wu – 2019-08-02T10:49:42.957