VMWare ESXi Guest CPU

CollinMendoza
CollinMendoza used Ask the Experts™
on
Im trying to understand when I build the VMware Guest server.

If the guest requirement for processor is 1 dual core or 1 quad core,
What do I set for the (number of virtual sockets and number of cores per socket)?

Please advise.
Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
I set dual core and 1 CPU in the example above.
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
Always use Sockets, and not Cores, unless you have a specific - per Core license agreement.

VMware vSphere (if you are using vSphere) by default always suggests the best specification for your VM.

What you need to workout, is how many CPUs your Guest requires.

1 vCPU, 2 vCPU.

vSMP (virtual SMP) can affect virtual machine performance, when adding too many vCPUs to virtual machines that cannot use the vCPUs effectly, e.g. Servers than can use vSMP correctly :- SQL Server, Exchange Server.

This is true, many VMware Administrators, think adding lots of processors, will increase performance - wrong! (and because they can, they just go silly!). Sometimes there is confusion between cores and processors. But what we are adding is additional processors in the virtual machine.

So 4 vCPU, to the VM is a 4 Way SMP (Quad Processor Server), if you have Enterprise Plus license you can add 8, (and only if you have the correct OS License will the OS recognise them all).

If applications, can take advantage e.g. Exchange, SQL, adding additional processors, can/may increase performance.

So usual rule of thumb is try 1 vCPU, then try 2 vCPU, knock back to 1 vCPU if performance is affected. and only use vSMP if the VM can take advantage.

Example, VM with 4 vCPUs allocated!

My simple laymans explaination of the "scheduler!"

As you have assigned 4 vCPUs, to this VM, the VMware scheulder, has to wait until 4 cores are free and available, to do this, it has to pause the first cores, until the 4th is available, during this timeframe, the paused cores are not available for processes, this is my simplistic view, but bottom line is adding more vCPUs to a VM, may not give you the performance benefits you think, unless the VM, it's applications are optimised for additional vCPUs.

See here
http://www.vmware.com/resources/techresources/10131

see here
http://www.gabesvirtualworld.com/how-too-many-vcpus-can-negatively-affect-your-performance/

http://www.zdnet.com/virtual-cpus-the-overprovisioning-penalty-of-vcpu-to-pcpu-ratios-4010025185/

also there is a document here about the CPU scheduler

www.vmware.com/files/pdf/perf-vsphere-cpu_scheduler.pdf

https://blogs.vmware.com/vsphere/2013/10/does-corespersocket-affect-performance.html
CollinMendozaIT Director

Author

Commented:
Andrew, Great info. Thank you.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
No problems, if you still need help, related to vCPU (virtual CPUs) in a VM, please ask, because it is a very misunderstood subject.

and often, you may need to allocate as many as 8 vCPUs, for the correct performance, and application.
CollinMendozaIT Director

Author

Commented:
I know it s bit confusing. so if I understand this...

the requirement is "1 dual core or 1 quad core" for SQL server.

so for my VMware guest, I set the "number of virtual socket" equal to 2(dual) or 4(quad" and the "number of cores per socket" equal to 1.

Is this correct?
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
Yes, always use Sockets.

Unless you have a license restriction and need to use Cores, that's why it was invented.

It's really not as straight forward as that, unless those requirements are based on virtual requirements, or are just based in the physical world.

Because a Dual Core Physical Processor (bare metal server) may not really equate to a Virtual Machine just with 2 Sockets (vCPUs).

the same is true of a requirement for 4 sockets (vCPUs).

I would recommend, you try 2/4 sockets, check performance, are you experiencing a CPU bottleneck, slowness which can be attributed to CPU, and increase.
CollinMendozaIT Director

Author

Commented:
Ok. sounds good. Thank you for the feedback.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
not a problem.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial