CPU Sockets vs CPU cores

RRJ

Member
Apr 14, 2010
245
0
16
Estonia, Tallinn
Hi.

I've got 2 cpus on my system, 4-cores each with HT, so total of 16 cores.
Is there any difference how do i manage these cores for client OS?
for an example is there any difference if i give my Win2k3 client OS 2 CPU sockets 2 cores each, or i give it 4 core on 1 socket?
 
Hi.

I've got 2 cpus on my system, 4-cores each with HT, so total of 16 cores.
Is there any difference how do i manage these cores for client OS?
for an example is there any difference if i give my Win2k3 client OS 2 CPU sockets 2 cores each, or i give it 4 core on 1 socket?

Just to clarify, there are not 16 cores, but 16 concurrent execution threads. There are just 8 cores. You should never consider HT "cores" as real cores.

Regarding your question, it will depend on the order "cores" are assigned to your VM. If I am correct, Linux reports cores in the real-virtual order. That's it, first, real cores are presented and then the HT ones. Therefore, it should be the same both of your choices. The problem would arise If you have just 8 "cores" left to assing to VMs.... as those would be "non-real" ones.

So, you should never go over 4 cores on a CPU.

Hope this helps.
 
why? for example openvz clients "like" to "see" as many threads as OS sees. And i run every single openvz pc with 16 cpus enabled for them (as my host os sees 16 cpus). its all virtual for the client, who cares? :) as far as i have 16 threads available and load average is less then 15 i wont even bother :)
the question is about fundamental difference between two approaches: 2 sockets with 2 core each or 1 socket with 4 cores :) i suppose that if i set it 2 sockets with 2 cores each, the host will then give the client access to 2 cores of 1st real cpu and 2 cores of second real cpu. if it is not so, than there is no difference at all.
and yes, i see no point to give KVM guests all 16 cores. 4 is more than enough, but it does not matter that i will give only 2 hosts 4 cores :) i run 4 hosts with 4 cores each and about 6 openvz clients with 16 cpus each.. Vhost LA is about 0,3 - 0,7. thats nothing for 16-threaded monster.
 
Last edited:
why? for example openvz clients "like" to "see" as many threads as OS sees. And i run every single openvz pc with 16 cpus enabled for them (as my host os sees 16 cpus). its all virtual for the client, who cares? :) as far as i have 16 threads available and load average is less then 15 i wont even bother :)
the question is about fundamental difference between two approaches: 2 sockets with 2 core each or 1 socket with 4 cores :) i suppose that if i set it 2 sockets with 2 cores each, the host will then give the client access to 2 cores of 1st real cpu and 2 cores of second real cpu. if it is not so, than there is no difference at all.
and yes, i see no point to give KVM guests all 16 cores. 4 is more than enough, but it does not matter that i will give only 2 hosts 4 cores :) i run 4 hosts with 4 cores each and about 6 openvz clients with 16 cpus each.. Vhost LA is about 0,3 - 0,7. thats nothing for 16-threaded monster.

The thing is that intel "invented" the concept of hyperthreading to make a better use of available resources. For example, there exist many integer units on a single core. Nevertheless, as the core is able to manage only one thread at a time, it is very frequent that many of such units remain idle. Therefore, what they did was to add another "control unit" that was able to keep two threads running simultaneously on a single core. But if both threads need the same logical/arithmetical unit, one of them will stall. As no all logical/arithmetical units are replicated at the same level, HT is only useful on certain scenarios, not all. For example, high loaded servers requiring a lot of floating point will not benefit much (expect a maximum of 20%-30% increase on performance for all scenarios). This is what I say "don't consider HT "cores" as real "cores" because some of your VMs can run into performace problems. Regarding OpenVZ, its mechanism is slightly different and I don't really know how it will be affected by HT (but I suppose it will the same way).

Regards,
 
well, i consider them the same way, but for my situation threads and cores are almost the same :) i don't have and never will have any high loaded guest on vhost.
so threads and cores course is complete :))
still waiting for some1 to answer about approaches.
thnx.
oh, and about 25-30% - that is, if i'm not wrong, true for single-core cpu with HT on. for 4-core cpu and HT on there is a bit other math. i suppose i can achieve about 50-75(!?)% with 2 PHY cpus 4 cores each and with HT on.
 
Last edited:
For OpenVZ, there is no Socket/CPU core option. Make sure you run 2.6.32-6, otherwise cpu limitation does not work (e.g. on 2.6.32-4).

Socket/CPU core applies only for KVM guests. this feature was introduced due to software licensing issues in the guest OS.
 
yes i understand that socket/cpu is for kvm guests only. so this feature is only to solve licensing issue and does not acts different?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!