Sockets/Cores in Proxmox

spetrillo

Member
Feb 15, 2024
241
12
18
Hello all,

Is there any performance advantage to increasing the socket count in a VM, or to increate the core count? For example I want 4 cores in my VM. Do I increase the sockets by 4, or the cores by 4?

Thanks,
Steve
 
Multiple virtual sockets are only relevant for systems with NUMA.
Can you elaborate on this a bit? I've noticed that by default NUMA is disabled in the advanced section of CPU when creating VMs but noted an increase in performance when increasing sockets from 1 > 2 with cores the same (i.e. 1 Socket 4 Core > 2 Socket 4 Core) and comparing. This is in 3 guest Win10 custom debloated machines. Host is 2 Socket by 24 cores/each Dell poweredge.

So far I've been creating VMs with 1 socket X cores for minimized performance needs, or, 2 Sockets X cores based on moderate / increased performance needs.

Edit: I haven't used NUMA on any yet. May test with it soon based on what you're saying.
 
Can you elaborate on this a bit? I've noticed that by default NUMA is disabled in the advanced section of CPU when creating VMs but noted an increase in performance when increasing sockets from 1 > 2 with cores the same (i.e. 1 Socket 4 Core > 2 Socket 4 Core) and comparing. This is in 3 guest Win10 custom debloated machines. Host is 2 Socket by 24 cores/each Dell poweredge.
Your two-socket system sounds like NUMA to me. Maybe I should have said to match the virtual sockets with the physical sockets. Enabling the NUMA option for your VMs might help even more, as the VM would be made aware that some memory is local to some virtual cores and the other half is not.

EDIT: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_numa
EDIT2: Previous discussion about this: https://forum.proxmox.com/threads/sockets-vs-cores-vs-vcpus.56339/
 
Last edited:
Your two-socket system sounds like NUMA to me.
Thanks for the advice! I just tested it and it's working well so far. I can't speak to it's performance increase yet, but in large scale, I'm sure it's enough to turn it on and do some testing.

To confirm you can run

Code:
lscpu | grep -i numa
NUMA node(s):          2
NUMA node0 CPU(s):     0-19,40-59
NUMA node1 CPU(s):     20-39,60-79

Which will display your numa configuration and how many nodes you have tells you how many virtual sockets you should be allocating when using the vNUMA enabled =1 argument in cpu configuration. I've always heard it's best to "match" sockets to vsockets. The proof is right there. Thanks again for your advice.
 
Cores. Multiple virtual sockets are only relevant for systems with NUMA.
I dont believe this is true. My understanding is that there isnt a LOGICAL difference to the guest at all, and the only reason the options exists at all (other than its just a part of the api) is to allow simulation of a multisocket system in a vm, which is useful in some licensed environments.

Personally I never bother.