Server 2012 on VMware ESX - guest CPU 100% host CPU 30% how to allocate more Host CPU resources

Having troubles getting any decent performance out of MS Server 2012 on ESX 5.5

The Guest CPU flatlines at 100% sometimes whilst the Host CPU is only at 30%

Why doesn't the host allow more CPU resources to the guest

Host has 2 x quad core Xeons

We have tried 2 vCPUs. single core, and also 2 vCPU 4 core. We are currently running 4 x vCPU it is as good as it seems to be able to get. how can I get the ESX host to allow more CPU resources to be available to the Guest OS
LVL 1
KCITSAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Increase the number of virtual sockets. (vCPU).

What process is causing this ?

What function is the VM performing ?
Dexter StoneSystem ArchitectCommented:
Down the VM and add cores per socket.

Or maybe migrate the VM to another ESX host and try there.
DaveCommented:
That sounds about right. You have 8 cores, you have given two to the guest. On an 8 core box each CPU is 12.5% of the total throughput. So 2 CPUs/Cores in the guest can use a maximum of 2x12.5% of the host which is 25% of the host.

So if you go to 4 VCPUs are you saying you get 100% on the guest and 30% on the host. Those figures don't add up. I guess that when you got to 4 vCPU you get 50% on the guest.

If so the problem may be that you have two apps running on the server both of which  are still single threaded, (Or one app which can only utilize two threads). This will show in task manager you will see two tasks using one CPU flat out. So on a two CPU box each will be running at about 50%, on a four CPU or 4 Core box they will be two running at 25% and the box is 50% busy. (perhaps a little more for OS over head).
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

KCITSAuthor Commented:
We have not experimented with vCores as I had read that ESX does not differentiate between cores and sockets when it comes to allocating CPU resources, and that the Cores/sockets were only there to beat O/S CPU restrictions.

We originally had 4 x CPUS (sockets), and this did not seem to make any difference to the feel of the machine, or allow the guest CPU to really decrease to below 90-100% for the first 10-30 mins of booting.  though there appeared to be plenty of spare CPU resources that the host could have allocated.

I was under the assumption that the host CPU would be 100% available to the guest if it was the only VM on the box, I guess I don't really see any benefit in ESX throttling when spare resources are readily available.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I was under the assumption that the host CPU would be 100% available to the guest if it was the only VM on the box, I guess I don't really see any benefit in ESX throttling when spare resources are readily available.

This is not true, using a hypervisor is a compromise.

Cores and Sockets performance is often equal.

What is the sever function ?

What is the datastore ? e.g. SATA disks ?
DaveCommented:
I was under the assumption that the host CPU would be 100% available to the guest if it was the only VM on the box, I guess I don't really see any benefit in ESX throttling when spare resources are readily available.

It (almost) is. However a single core/cpu VM can't use more than a single core/cpu of physical. VMware does not know enough about the OS to schedule CPU work "out of order", and provide any sort form virtual multi threading across cores/cpus.. So if you give a VM a single core, that's all it can use on the host. It doesn't really matter too much how you divide cores and sockets. I believe that are some performance implications to do with shared cache and NUMA (none uniform memory access) but I believe VMware can work round those. Note its not a good idea to allocate the same number of cores as exist on the host to a VM (In fact not sure if VMware will let you do that) as that means when VMware is busy the host may not be able to be dispatched...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KCITSAuthor Commented:
Thanks, adding additional CPU was helpful.
The server is a Microsoft exchange server and it seems to peak at close to 100% CPU for some time (up to 10 mins) after each reboot, before settling down to a usable level.

The effect of adding more sockets was noticeable after the initial CPU panic had settled down.
DaveCommented:
If its a 64-bit Exchange then its worth trying it with more RAM as well, but you may have done that already.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.