Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


VMware – question regarding # of cores per virtual machine

Posted on 2011-02-10
Medium Priority
Last Modified: 2012-05-11
I have a question regarding the number of cores or CPUs you can assign a virtual machine.  Is there a number that would start to impede performance of the virtual machine?  The company that I work for recently hired a new IT manager.  He is very knowledgeable about VMware.  He said that virtual machines should not have more than one core or one CPU assigned to them.  He said assigning more cores can actually impede performance.  We are running ESXi 4.1 and I find it hard to believe that VMware allows you to assign up to 8 processors per VM yet using more than one CPU can impede performance.  The new guy has been working with VMware for years.  Is this something that maybe was true in early versions of VMware but isn’t true now?

I’m fairly new to VMware and was asked to virtualize a SQL server.  The physical server has two quad core processors.  I don’t feel comfortable virtualizing the server and only giving it one CPU.

Is this guy correct with his assumption that you should only assign one core or CPU per virtual machine for performance reasons or is he totally wrong?  Any insight or links to documentation that would prove him wrong would be appreciated (assuming he is wrong).

Question by:steno1122
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
LVL 28

Expert Comment

ID: 34867743
You introduce a bit of overhead whenever you introduce a SMP environment as compared to a one processor environment. That being said the answer to your question is "it depends." It depends primarily on the applications you are to be running in the vm as well as the processor requirements.

Rule of thumb - start with one and if the vm turns out to be processor bound then add another. If you add another and the vm doesn't need it, then there will be degredation. On the other hand, it there is significant load and an application that can take advantage of all those cores (like SQL for example) then by all means - it will run much better with multiple processors.

Hope this helps

Expert Comment

ID: 34867753
The answer is no it will not impede performance as long as the server is part of the VMWare HCL.

I had the same point brought to my attention and after researching I found this article that describes it best.

LVL 42

Expert Comment

ID: 34867755
unless you have a multithreaded application such as sql you will not take advantage of multiple vCPUs.  He is correct on the CPU side because the more CPUs your VM has the slower it may be.  The reason for this is that the vCPUs have to be queued up to do any work even though there may be only enough processing for a single vCPU.

As bgoering stated started with 1 and go from there.  With windows 2008 x 64 and up you can hott add CPUs on the fly if needed if you setup the VM correctly.
LVL 123

Accepted Solution

Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 34867766
There is a general rule of thumb only allocate vCPU is you really need them and the operating system and applications can utilise them.

Over allocation of any resource can impede performance of the host, and in return impede performance of ALL the VMs.

On VMware Training courses theyn advise, only add additional vCPUs if required.

But Virtual Citrix/Terminal Servers and SQL servers (remember the licensing if you are per processor) are often given two vCPUs.


Sin­gle vCPU vs Mul­ti­ple vCPUs

Take a cau­tious approach to allo­cat­ing mul­ti­ple vCPUs to a VM, as you can cre­ate extra over­head by sched­ul­ing two or more vCPUs in a VM, which would be detri­men­tal to the per­for­mance of the VM.

To deter­mine if mul­ti­ple vCPUs assigned to your VM is caus­ing poor performance:

   1. Open a con­sole prompt on the ESX host or ini­ti­ate an SSH con­nec­tion to it. .
   2. Type esx­top and press Enter.
   3. On the CPU screen, check the %CSTP value. If this num­ber is higher than 100, the per­for­mance issues may be caused by the vCPU count. Try low­er­ing the vCPU count of the vir­tual machine by 1.

      Note: The %CSTP value rep­re­sents the amount of time a vir­tual machine with mul­ti­ple vir­tual CPUs is wait­ing to be sched­uled on mul­ti­ple cores on the phys­i­cal host. The higher the value, the longer it waits and the worse its performance.  Lowering the num­ber of vCPUs reduces the sched­ul­ing wait time.

To lower the vCPU count:
Note: The vir­tual machine must be pow­ered off to per­form these steps.

   1. Right-click on the vir­tual machine and click Edit Set­tings.
   2. Click CPUs.
   3. Use the Num­ber of vir­tual proces­sor drop-down to lower the vCPU count by 1.
   4. Click OK.
   5. If your vir­tual machine still expe­ri­ences per­for­mance issues, and if its ker­nel or HAL can han­dle switch­ing to a sin­gle vCPU, lower the vCPU count to 1.

      Warn­ing: If your vir­tual machine’s ker­nel or HAL can­not han­dle switch­ing to a sin­gle vCPU, unex­pected behav­iour may occur.


Determining if multiple virtual CPUs are causing performance issues


Determining if multiple virtual CPUs are causing performance issues



Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

You deserve ‘straight talk’ from your cloud provider about your risk, your costs, security, uptime and the processes that are in place to protect your mission-critical applications.
Let’s face it: one of the reasons your organization chose a SaaS solution (whether Microsoft Dynamics 365, Netsuite or SAP) is that it is subscription-based. The upkeep is done. Or so you think.
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

730 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