VMware Cloud Community
joeflint
Enthusiast
Enthusiast
Jump to solution

VM cpu Cores


Hi, is it possible to allocate a VM CPU cores, e.g. assume a VM has 2vCPU and 2 cores per CPU - is this possible. and whats the benefit rather than say allocate 4vCPU?

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

Yes, that's possible. Some operating systems do not support a large number of sockets (processors) but allow multi-core processors. If you e.g. need 4 vCPUs for an OS which only supports 2 sockets, you need to present virtual multi-core vCPUs to the guest. Another reason for multi-core vCPUs could be per-socket licensing for applications.

André

View solution in original post

0 Kudos
8 Replies
a_p_
Leadership
Leadership
Jump to solution

Yes, that's possible. Some operating systems do not support a large number of sockets (processors) but allow multi-core processors. If you e.g. need 4 vCPUs for an OS which only supports 2 sockets, you need to present virtual multi-core vCPUs to the guest. Another reason for multi-core vCPUs could be per-socket licensing for applications.

André

0 Kudos
ShadyMalatawey
Enthusiast
Enthusiast
Jump to solution

Hi...

In VM settings you can assign any number of vCPU (sockets) and how many cores per socket..
Its benefit is for VMs with Guest OS charged for certain number of sockets..
And I think it will differ in very heavy-load VMs in performance..
I'll try to get u the article i passed with once about that...

Sincerely, Shady Ali El-Malatawey MCITP: Virtualization Administration 2008 VCP5-DCV/DT --- VCAP5-DCA/DCD @ShadyMalatawey https://virtualpharaohs.com
TomHowarth
Leadership
Leadership
Jump to solution

Yes with all versions of ESX from 4.0 upwards you can.Firstly it depends upon version,  on how you have to do this,

with version 4.x you have to manaully edit the VMX file

with version 5.x you can set the core count from the settings form.

as to why you would do this

it can reduce license count on those applications that are licensed on Sockets

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
joeflint
Enthusiast
Enthusiast
Jump to solution

Sorry one more question to get my head around this.

I want to make sure that we use no more than 6 vCPU per CPU on ESXi host. So if I had a VM say with 2vCPU and 2 Cores, will this equate to 2 vCPU or 4 vCPU?

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

2 vCPUs with 2 virtual cores each equals 4 vCPUS. It's only the presentation to the guest which is different by setting up cores per vCPU.

André

0 Kudos
ShadyMalatawey
Enthusiast
Enthusiast
Jump to solution

equate to  4 vCPUs Smiley Happy

Sincerely, Shady Ali El-Malatawey MCITP: Virtualization Administration 2008 VCP5-DCV/DT --- VCAP5-DCA/DCD @ShadyMalatawey https://virtualpharaohs.com
0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

As Andre says,  A guest with 2vCPU and 2cores will use 4 logical CPU on the host. as will a guest with 1vCPU and 4 cores, or a Guest with 4vCPU.

all that has changed is how it is presented to the Guest OS.  personally if I am playing with Cores I tend to keep vCPU count as low as possible, this has the added advantage of lowering Socket based licensing costs

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
Viewaskew
Enthusiast
Enthusiast
Jump to solution

I just had this discussion with someone who was insistent that assigning a VM, for example, with 1 socket and 4 cores that the vCPU was “bound” to one physical CPU (socket not logical) and running on 4 of its cores which is not the case. Then came the question of scheduling and it if it differed if say you had 1 socket and 4 cores or 4 sockets with 1 core each.

As far as Ive been able to research, I can’t find any scheduling differences in either configuration as the vCPU  count is the same and as we know, a vCPU is a logical CPU and that’s defined with another example of a server with 2 sockets with 8 cores so has 16 cores or logical processors and if you have hyperthreading enabled this is doubled to 32 logical processors.

0 Kudos