how to determine the correct number of cpus needed in a vsphere virtual server

Posted on 2013-01-11
Medium Priority
Last Modified: 2013-01-14
We are constantly getting asked to add more cpus to servers and also when
we are building new virtual servers we are getting asked to put in 4+ cpus
i have heard that in some cases more cpus = worse performance.
Is this still the case in newer versions of vsphere?
How can i find out
when its better to add cpus
when its better to remove cpus
Question by:dougdog
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
  • 13
  • 12
LVL 122
ID: 38766387
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

see here


also there is a document here about the CPU scheduler


See my EE Article on performance

HOW TO:  Performance Monitor vSphere 4.x or 5.0

Many VMware Admins make the mistaken of overcomitting processors, because they can. Start with a single and grow. (add more).

What are the physical requirements for the service, would the physical server require 4 processors?

We often create VMs for Clients, and ask they to test performance, if they are not satisfied after testing we look at performance graphs, CPU and Memory, and increase slowly.

Otherwise we would have some very silly VM requirements, because they do not often know, what to allocate.

Author Comment

ID: 38766534
what is classed as high cpu ready?
i have attached a screenshot of a vm i have with 4 cpus and its cpu ready chart
is this high

Author Comment

ID: 38766547
this is from esxtop on 1 of my hosts

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 122
ID: 38766561
what are you min and max readings?

it should be as low as possible, the higher the reading (milliseconds), the slower the VM is performing, and with many processors attached you see high readings.

is the VM performing okay?

you may want to experiment, and maybe drop a vCPU

what is the server?

Author Comment

ID: 38766575
its a front end server running iis
min max readings ?
are thesew in the screenshots attached or do i need to look somewhere else
LVL 122
ID: 38766596
see here on the charts

CPU Ready

Author Comment

ID: 38766605
did you open the attachments i sent
does this indicate high cpu ready
LVL 122
ID: 38766640
from that graph, it is high at that time.

look at my graphs, for a very busy, stressed out vSphere Data Protection appliance, with 4 vCPUs and 8GB of memory.

Author Comment

ID: 38766656
the average on your appliance is 46.856
is this classed as high
what is the easiest way to go through all my virtual machines to see if adjusting the cpu count either up or down would be beneficial
seems complicated to know when to add more cpus and when to take away
LVL 122
ID: 38766700
that's low, it's in milliseconds.

but are your VMs slow?

is performance of your VM being affected?

you really need to have a baseline average over a few weeks.

if you look at your charts, it's at 75,000 miliseconds!

that's 75 seconds compared to my 45 miliseonds! (over a 1 minute)

I would use a monitoring tool, you could use Veeam One for FREE.


basically you should always start with 1, and then add more.

Author Comment

ID: 38766739
ok so does that mean that machine was waiting over a minute to get all cores available before it could exexute
yeah users quite often complain systems are slow

Author Comment

ID: 38766756
ok so ready and costop are used to monitor cpu over allocation
what are best indicators to monitor cpu under allocation

Author Comment

ID: 38766772
also on my chart sometimes it spikes to 300000milseconds does this mean sometimes a wait time of 5 min
LVL 122
ID: 38766783
I'm not sure how much traffic your front end server deals with, but reducing the number of CPUs may help.

also depends on the host, and number of processors and cores available, and how many VMs you have running, and how they are setup.

Utilization of the Processor!

100% CPU!

also see this, which is in my EE Article

LVL 122
ID: 38766799
your chart is very high, are all your VMs like this?

reduce cpus on a VM.

Author Comment

ID: 38766932
so does that mean the machine was waiting for a minute to get resources or is that incorrect
LVL 122
ID: 38766961
it means that for  75,000 miliseconds of the previous sample period the vCPU was ready to run and not getting resources!

so you are correct.

Author Comment

ID: 38766977
i have around 16 vms running on each esx server
the esx server has 2 quad core cpus

Author Comment

ID: 38766989
even worse on that chart sometimes it spiked to 300000 surely that cant mean waiting nearly 5 min for resources

can it???
LVL 122
ID: 38766990
that should be fine, unless you give ALL your VMs,

4 vCPUs!

reduce vCPUs!
LVL 122
ID: 38767012
if the charts are correct, yes if poorly setup VMs, waiting for resources.

it will be detrimental to the VMs overall performance.

Front End Server for Exchange?

Author Comment

ID: 38767014
ok so before i close question
did that spike of 300000 mean 5 min wait?
and what are best metrics to look for to see if more cpu is needed
LVL 122
ID: 38767026
I would highly recommend, a good read of my EE Article and the Links within


or make it easier for yourself, and install Veeam One for Free.

Author Comment

ID: 38767055
still so confused this chart from a slow performing server shows really high cpu ready
it has 2 x vcpus
so the high cpu ready would mean cpu overallocation
but there are high cpu alarms triggered often
how can this be
LVL 122

Accepted Solution

Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 38767110
you will always get high cpu triggers, but this does not mean that the VM is started of processes!

however, if your CPU is always at 100% for 24 hours, that's not performing well.

if you have overallocated CPUs to all your VMs, they will all be struggling to get CPU time, on the Cores.

you need to look at the baseline figures, and overall performance.

I would recommend you install Veeam One for FREE.

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Question has a verified solution.

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

If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

801 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