Solved

best way to set up cpus and sockets for vmware

Posted on 2015-01-09
3
354 Views
Last Modified: 2016-11-23
Greetings,

I have a vmware ESXi 5.5 virtual system going into production shortly.  The hardware is a Dell PE R720 with 96 GB RAM, and dual Xeon 8-core CPU's with hyperthreading, so I believe that gives me a theoretical 32 vcpu's available for the VM's.  I am running an Exchange 2010 VM, SQL 2012 VM, a DC, a WIn 2008 file server, and a couple of other VM's on this server.  It's pretty well loaded.  My question is what is the most efficient way within the individual VM"s to configure the cores and sockets to avoid a given VM monopolizing available vcpu's?  As an example, say that I design the SQL Server VM to have 8 CPU's, and within the vm settings I configure that to be 2 sockets with 4 cores per socket.  To what extent does that tie up available virtual cpu's, cores or sockets?  Is it better to specify more vs. less sockets?  Additionally is there a way to specifically tell the VN's to "share" vs. "grab"? A similar concern I have is whether specifying 8 CPU"s for the SQL Server VM may lead to a situation, depending on the configuration, where the VM running SQL server says something like "I need 8 vpu's to myself and only 6 area available, so I'm going to pause all operations until a full 8 become available".  Apologies for the somewhat banal examples, but hopefully I'm communicating this with some degree of clarity.  Ultimately I'm hoping there are a few guidelines for setting up the VM"s with best overall efficiency towards utilizing the available vcpu's .

Many thanks in advance for your thoughts.
0
Comment
Question by:jkirman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 62

Assisted Solution

by:gheist
gheist earned 250 total points
ID: 40541881
Hyperthreading is not a CPU core. If you exceed 2 vCPUs per core (hyperthreaded or not)  you see some slowdowns.

Deep in Intel documentation you see that hyperthreading is not 50:50 split, more like 80:20 depending on load in each side. You can have 32 vCPUs, but you must support vNUMA to get past 8 and keep performance, and total performance will be equal to 16 vCPUs

You should keep 1 core per socket in VM, then you can hotplug any amount of CPUs later
Since vCPUs are exclusively allocated to VM there is no chance to somehow prevent access to them for that VM
Same applies to SQL configuration

Maximum number of vCPUs per CORE is 20-64 depending on vmware ESXi version. Once you exceed that a new VM will not start (by the time running VMs will be slow as hell)


I suspect you miss something with terms vCPU vs CPU.
0
 
LVL 120

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 250 total points
ID: 40541882
Always allocate sockets (vCPUs) unless you have a specific License Restriction based on cores.

Whether you allocate Sockets or Cores, performance is the same, do not over allocate vCPUs, start small, with a single vCPU, and add vCPUs, very few VMs in our experience require more than 2!

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

see also this EE Question

http://www.experts-exchange.com/Software/Virtualization/Q_28593980.html
0
 

Author Closing Comment

by:jkirman
ID: 40557050
Thanks much to you both for your explanations and extensive referenced links.  I will research what you've provided, but I get the basics of what you're both saying, which is start small, test, and understand how the Scheduler really works.  Cheers and many thanks again.
0

Featured Post

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as the high-speed power of the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 10 Sound Driver Issue 26 61
Create a vswitch VM 6.0 11 47
Backup of vCenter Server 16 39
SSIS on VMWare 5.01 9 33
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Teach the user how to convert virtaul disk file formats and how to rename virtual machine files on datastores. Open vSphere Web Client: Review VM disk settings: Migrate VM to new datastore with a thick provisioned (lazy zeroed) disk format: Rename a…
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question