Sockets vs Cores vs vCPUs

MAMProgr

Member
May 5, 2017
4
0
6
28
Hi,

What are the differences between Sockets, Cores, and vCPUs.

For example,
a. 4 Sockets, 1 Core, 1 vCPU.
b. 1 Socket, 4 Cores, 1 vCPU.
c. 1 Socket, 1 Core, 4 vCPUs.
are these 3 VMs have same performance?
 

Vladimir Bulgaru

Active Member
Jun 1, 2019
202
38
28
34
Moscow, Russia
Hey!
  • Socket is the physical slot for a CPU. It matters if, for instance, you need NUMA (allocated RAM per CPU, which speeds up computation).
  • Core - is the physical core a CPU has. Here it gets a bit confusing - within Proxmox the number of cores equals the number of threads, so if your CPU supports hyper-threading, the cores count is double the physical cores of the CPU. Within Proxmox settings, it tells how many threads per each socket should be allocated.
  • vCPU - by default, it's the product of sockets and cores per socket allocated. To cite the docs:
    In Proxmox VE the maximal number of plugged CPUs is always cores * sockets. To start a VM with less than this total core count of CPUs you may use the vpus setting, it denotes how many vCPUs should be plugged in at VM start.
    As far as i understand, you can start a VM with less vCPUs than set via sockets and cores and increase them upon need (ballooning style).
Given your scenarios:
  1. 4 Sockets, 1 Core, 1 vCPU means that a max of 4 vCPUs are possible, but you are starting a VM (only Linux support) with one vCPU
  2. 1 Socket, 4 Cores, 1 vCPU - same situation - max of 4 vCPUs are possible, but you are starting a VM with one vCPU
  3. 1 Socket, 1 Core, 4 vCPUs - not possible to set it up, as vCPUs are <= sockets * cores.
At the same time:
  1. 4 Sockets, 1 Core, 4 vCPUs - allows for NUMA optimisations if your server has actual 4 sockets
  2. 1 Socket, 4 Cores, 4 vCPUs - identical to previous scenario, if NUMA is not used / considered, but may influence the cost of licensing
To sum up:
  • most likely you don't need to touch vCPU settings
  • more sockets with less cores each (but <= than physical sockets on the system) allows for NUMA optimisation
  • less sockets with more cores each may decrease the licensing costs, since some licenses are socket-based
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!