VMware Cloud Community
TimothyGaray
Contributor
Contributor

When to add more vCPUs to a Virtual Machine?

What indicators would someone use to decide when it would be best to add more vCPU's to a Virtual Machine?

In particular, we have a production server running Oracle. Understanding the scheduling issues around multiple vCPU's, how would we know when adding more vCPU's to the VM would help performance (aside from trial and error)? Occasionally this machine performs poorly and the vCPU's show as running at 100%. It is running Windows Server 2003 Enterprise and is currently configured with 2 vCPU's and 8GB of vMem.

Thanks for any help.

-Tim

Reply
0 Kudos
7 Replies
habibalby
Hot Shot
Hot Shot

Hello,

Poor performance of VM depends on many factors.

  1. Number of CPUs that are running on the ESX Hosts

  2. CPU Speed and Model

You can see the VM consumption how much the VM is using from the VM -> Summary Tab "Consoumed Host CPU, Consumed Host Memory and Active Guest Memory".

Running a VM on Host that Have single daul-core cpu 3.0 Ghz, and the VM CPU consumtion is 5000 MHz, then you are lacking of CPU resources on the ESX Host.

In this case you can add additional CPU to the VM and test it's performance

Best Regards,

Hussain Al Sayed

If you find this information useful, please award points for "correct" or "helpful".

Best Regards, Hussain Al Sayed Consider awarding points for "correct" or "helpful".
Reply
0 Kudos
Braumin
Contributor
Contributor

If your applications are using 100% of your CPU resources, give it more. Applications like Oracle can obviously scale with multiple CPUs, so if they are using 100% now, and you have extra available, bump it up to 4 and see if it works better. It is a bit of trial and error. Generally I start low (1CPU if possible) and work my way up from there.

Reply
0 Kudos
TimothyGaray
Contributor
Contributor

In this case, it is using 1380MHz of a host with (8 x 3.158GHz) 25265MHz. They are Intel Xeon X5460 processors. Total CPU usage on the host is 6069MHz..

-Tim

Reply
0 Kudos
habibalby
Hot Shot
Hot Shot

Is the VM under Resourse Pool? If yes, doe the resourse pool has got enough resourses to provide the vms under it? Try to move the VM out of resourse pool. If not, then add more vCPUs to it and monitor the performace.

Best Regards,

Hussain Al Sayed

If you find this information useful, please award points for "correct" or "helpful".

Best Regards, Hussain Al Sayed Consider awarding points for "correct" or "helpful".
Reply
0 Kudos
s1xth
VMware Employee
VMware Employee

To answer your question, without looking in depth at esxtop or any graphs I wouls say you are fine where it is.

http://www.virtualizationimpact.com http://www.handsonvirtualization.com Twitter: @jfranconi
Reply
0 Kudos
TimothyGaray
Contributor
Contributor

No resource pools have been setup on this host or cluster.

One fear that was brought up was that if Oracle is chewing up 100% of 2 vCPUs then giving it 4 vCPUs may just allow it to chew up 100% of 4 vCPUs...

-Tim

Reply
0 Kudos
FredPeterson
Expert
Expert

No resource pools have been setup on this host or cluster.

One fear that was brought up was that if Oracle is chewing up 100% of 2 vCPUs then giving it 4 vCPUs may just allow it to chew up 100% of 4 vCPUs...

-Tim

If this were to be true, then you're looking at one of those rare cases where it should be its own stand alone physical.

The main questionshould be: Is the application truly multi-threaded or multi-process? (meaning, will it spawn additional processes to pick up the slack?) If responsiveness and timelyness to completion is important and adding a second CPU will help, you do it.

I run a particular VM that for all intents and purposes everyone on this board would probably say it should only be one vCPU - that is until I tell them how the application it services works and then realization strikes that yes, it works perfectly fine with 1 vCPU - but what it does is of utmost importance for timing (clinic patient data manipulation) and at times the system is hit with multiple requests that can be serviced by spawned processes that take advantage of what seems like a mostly dormant 2nd vCPU. Sure it could do the job in 2 minutes on 1 vCPU, but if it can do it in 1 minute doing two things at once to service two different patients at two different clinics? I'd rather do that.

Reply
0 Kudos