VMware Cloud Community
akreitman
Contributor
Contributor

Sockets, Cores, Hyperthreads and Affinity

     A real example.  I have a two cpu server, each cpu has 6 core, hyperthreaded, so its a total of 24 processors, sort of.   Each hyperthread may look like a stand alone processor, but in fact it actually shares resources with the other hyperthread.  So, each "logical processor" can be specified by socket, core, thread.   First,  in VMware 5, I specify sockets,core.   Is there any difference between a virtual machine with 4 sockets and 4 core from a vm with 8 sockets and 2 core, or 1 socket and 16 core (you get the issue).  Second, processor affinity is specified by cpu number, how does that map to socket,core,thread.

Thanks

Tags (1)
0 Kudos
2 Replies
Dave_Mishchenko
Immortal
Immortal

> Is there any difference between a virtual machine with 4 sockets and 4 core from a vm with 8 sockets and 2 core, or 1 socket and 16 core (you get the issue).

I don't think there is an official statement on this, but I've seen some mention that in their testing it didn't make a difference.

> Second, processor affinity is specified by cpu number, how does that map to socket,core,thread.

It's socket, core and then thread.  So 0 and 1 are  on the same core.  See this document for some notes on affinity if you have hyperthreaded enabled.

http://www.vmware.com/pdf/vsphere4/r41/vsp_41_resource_mgmt.pdf

0 Kudos
Virtualinfra
Commander
Commander

akreitman wrote:

       First,  in VMware 5, I specify sockets,core.   Is there any difference between a virtual machine with 4 sockets and 4 core from a vm with 8 sockets and 2 core, or 1 socket and 16 core (you get the issue). 


Socket and core feature in Vsphere 5 in VM edit setting is introduced to fix the OS compatability issue. For example windows 2008 R2 Enterprise supports only 8 socket but 256 core. in Vmware 1 vcpu is 1 socket. So if you put 4 in socket place and 4 in core place you will get 16 core.but if you see in the summary tab of the virtual machine it is still shown as 16 vcpu. So there is no difference whether you configure it in socket or core. final ESXi see it as vCPU.

Second, processor affinity is specified by cpu number, how does that map to socket,core,thread.


it is mapped to cores. Once you enable hyperthreading 1 core is show as 2 cpu, namely 0 and 1 so the VM with 2 vcpu will be mapped to 1 core.

if you have not enabled hyperthreading then its mapped to cores. ESXi is better aware of resources scheduling. as update in previous post refer the resource management pdf.

Thanks & Regards Dharshan S VCP 4.0,VTSP 5.0, VCP 5.0
0 Kudos