Go Premium for a chance to win a PS4. Enter to Win


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
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

by:Paul Solovyovsky
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 124

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

Identify and Prevent Potential Cyber-threats

Become the white hat who helps safeguard our interconnected world. Transform your career future by earning your MS in Cybersecurity. WGU’s MSCSIA degree program was designed in collaboration with national intelligence organizations and IT industry leaders.

Question has a verified solution.

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

Many of the companies I’ve worked with have embraced cloud solutions due to their desire to “get out of the datacenter business.” The ability to achieve better security and availability, and the speed with which they are able to deploy, is far grea…
In this article, the configuration steps in Zabbix to monitor devices via SNMP will be discussed with some real examples on Cisco Router/Switch, Catalyst Switch, NAS Synology device.
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…
This video shows you how to use a vSphere client to connect to your ESX host as the root user. Demonstrates the basic connection of bypassing certification set up. Demonstrates how to access the traditional view to begin managing your virtual mac…

772 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