VM's and core processors

If you have an ESXI host with 2 physical processors 6 cores on each so a total of 12 cores. Does each VM on the host essentially utilise all 12 cores. For software licensing exercises it is based on cores (SQL Server). So from the outset if a VM running the SQL Server software is hosted by an ESXi with 12 cores then presumably you need 12 core licences. But I wasnt sure if VM's can be configured to only use say 4 or 6 of the cores on the host, therefore reducing the number of core licences required.
LVL 3
pma111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pma111Author Commented:
also when designing your environment, if you have say 4 hosts each with 12 cores. If you even install SQL on one VM run by each of these hosts, for example, does that then mean you need 48 core licences - 12 for each VM running SQL on 4 hosts. Would it not be better to only run each SQL VM on the same host thus reducing the number of core liscences required down from 48 to 12? i.e. run all 4 SQL VM's on one host with 12 cores. As opposed 1 SQL VM on 4 hosts each with 12 cores.
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
The hypervisor, will scheduled workload, across all 12 cores in the physical host, every millisecond (or less!).

So yes, it will use ALL the cores, but not all at the same time..... CPU time slicing...

It depends on how you setup the VM, which could be by Sockets or Cores.

Yes, they can be configured to use Cores for licensing requirements, you can set Cores.

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

I'll shall refer you to the Microsoft SQL 2012 Licensing Guide

http://download.microsoft.com/documents/china/sql/SQL_Server_2012_Licensing_Reference_Guide.pdf

All cores running the Virtual Machine must be licensed.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.