Creating VMware Virtual Servers CPU

I'm creating a new Server 2012 Windows server and have a question about the CPU setting.  

I'm using VMware and need to create a server with 12 cores.   When prompted for the CPU I'm given both a " Number of Virtual Sockets" and " Number of Cores per socket " .....    

I don't totally understand these values and need a bit of help setting them.      

Thanks ...

Joel
jtbrown1111Asked:
Who is Participating?
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Use the DEFAULT, which is assign virtual sockets (vCPU) not Cores, unless you have a specific licensing requirement to use cores.

The Default to assign sockets is best. Now assigning 12 CPUs to a VM, could be overkill, what is the application ? Often a requirement is based on a physical server requirement, not a virtual server.

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/

https://blogs.vmware.com/vsphere/2013/10/does-corespersocket-affect-performance.html
0
 
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
I think that the best answer is this one:
In VMWare does not make a difference.  It is purely based on how the CPU's are presented to the guest.  Whether you choose dual sockets single core each, or single socket with dual-core, VMWare treats those as the same, you get 2 cores of CPU time.

The main reason this was added was for software licensing on the guests.  In our case, our SQL server has a single processor license.  If I want to allocate 4 cores and I use the default of 4 sockets single core each, then I am in violation of my SQL license, because that is 4 sockets.  If I change that to a single processor with 4 cores, then I am legal again.  I get the same performance in VMWare either way.

Microsoft has already announced that many of their new versions of the software will be on a per core license model, such as the new version of SQL Server.

Source:https://community.spiceworks.com/topic/189740-vmware-virtual-sockets-vs-cores-per-socket-which-give-better-performance

Also, there's an analytic answer about it here:

http://www.virtualizationsoftware.com/virtual-cores-virtual-sockets-vcpu-explained/
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
As a rule of thumb, use virtual sockets if you software (e.g. OS) does explicitely asks for cores. Some softeare is optimized for using multiple cores, but most don't care, and then sockets is the best approach. VMware is able to map virtual sockets to real cores best, while choosing multiple cores forces VMware to mirror exactly that, reducing the ability to optimize itself.

In theory, sockets are considered to operate independently from each other, only sharing external resources (physical memory, memory bus). Cores are sharing some parts of the processor, like cache and internal memory bus, and some logic units, so two cores can compete over resources sockets do not have to, while having faster access to some common resources.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
This is true, many VMware Administrators, think adding lots of processors, will increase performance - wrong!
There is much truth in that. Imagine a machine running a single-threaded high-cpu process. With one processor, it can use 100% CPU. With two 50%, aso. No performance gain in regard to this single process. However, with a two+ CPU VM other processes can still run well if the high-CPU process goes full steam ahead.
0
 
jtbrown1111Author Commented:
I will be installing Sql 2016 standard on this server using the server/user cal licensing model.   The software running on the server will require 12 cores ........
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
How many concurrent users will use the database ?

Does your host have dual processors ?
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Sounds horribly oversized, but so be it. Just use sockets to get the best result - provided you can assign that much and they are recognized by the OS.
0
 
jtbrown1111Author Commented:
@ Andrew,     At most we will have 50 concurrent users connected to the database ....    The servers have 2 each of PROCESSOR, X5650, 2.66/6.4, 12MB, XWM, B1 .......

Joel
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
That's not many...I would refer to this document, to architect your SQL VM...

those are quite old HOST processors...check ESXi is supported and on HCL.

Architecting Microsoft SQL Server on VMware vSphere

Getting SQL Servers to perform well under a hypervisor - vSphere or Hyper-V - can be tricky and just throwing processors at it, sometimes may not be the best thing. Memory and Datastore IOPS is criticial!
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.