CPU Cores Explained!

ismail kaleem
3 min readMar 3, 2020

--

Sockets, CPU Core and Hyper-Threading.

run command lscpu

Architecture:        x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 56
On-line CPU(s) list: 0-55
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz
Stepping: 1
CPU MHz: 1200.951
CPU max MHz: 3500.0000
CPU min MHz: 1200.0000
BogoMIPS: 5199.47

The central processing unit (CPU) in your computer does the computational work — running programs, basically. But modern CPU’s offer features like multiple cores and hyper-threading.

Since the advent of multi-core technology such as dual-cores and quad-cores there is confusion regarding what a microprocessor consists of and what is the correct terminology.

Socket

The socket refers to a physical connector equipped with leads or pins on a computer motherboard that accepts a single physical chip. Many motherboards can have multiple sockets that can in turn accept multi-core chips.

In my case, this is 2 physical sockets.

Chips or Cores or CPU

A chip or CPU chip refers to the actual integrated circuit (IC) on a computer. A chip mainly refers to execution unit that can be a single core technology or a multi-core technology.

Core(s) per socket:  14

In my case, its 14 Cores x 2 Sockets = 28 Cores.

Hyper-Threading

In 2002, Intel introduced the first processor with hyper-threading. Hyper-threading creates two “logical processors” within each physical processor core of an actual physical processor, that are visible to the operating system.

So in my case, Thread(s) per core: 2

The total number of Logical CPU in my case

2 Socket(s) x 14 Core(s) x 2 Thread(s) = 56 Logical CPU

When it comes to certain software licensing, its sometimes based on the number of sockets, Cores or the Logical CPU.

Virtualization with ESXI 6.7

Those who are running on ESXI Free version.

Max number of physical CPUs per-host: 2 Sockets

Now, that’s great as it can support my machine’s total physical sockets. This was 1 socket in previous versions if i can remember correctly.

Max number of Virtual processors (vCPU) per-VM: 8 vCPUs

In our case, 2 Sockets x 14 Cores = 28 pCPU

The total number of vCPU is 56 = 28 pCPU x 2 Threads

So now If I allocate 12 vCPU for 10 VM’s that is total of 120 vCPU

Try not to assign more vCPUs than needed to a VM as this can gratuitously limit resource availability for other VMs and increase CPU ready wait time.

CPU virtualization adds varying amounts of overhead depending on the workload and the type of virtualization used. In older versions people used to select 1 physical socket and more Core’s per socket while creating a virtual machine to bypass license restrictions for Windows SQL or other server’s.

The ESXI free version host has a restriction of 8 vCPU per VM. This is quite low if you are planning to run a *nix server with docker. Therefore, it is better to run on a bare-metal server.

Server 2016 Standard and Data-Center edition 64 Sockets (unlimited Cores).

The Standard Edition allows 2 Virtual Machines (Hyper-V) while the Data-center edition supports unlimited virtual machines (Hyper-V).

When you run your container;s you could specify the CPU restrictions so that they do not eat more than what they are allowed to chew!

docker run -it --cpus="12" ubuntu /bin/bashor update an existing container!sudo docker update container01 --cpus=12

--

--

No responses yet