VMware

This Question is Not Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
9 Replies Last post: Feb 15, 2009 9:56 AM by inspiron2  

Quad-core cpu on host machine, how many CPU's to pick for guest? posted: Feb 15, 2009 7:35 AM

Click to view inspiron2's profile Novice 18 posts since
Sep 29, 2008
Hi,

I am running workstation version (and occasionaly also run player version) on host machine, which is Q9550 based (Quad-core). The guest OS is Windows 2003.

There is an option in virtual machine settings to pick the number of CPUs. I have currently set it to 1 (one) because I read somewhere that increasing the number of CPU's actually decreases the performance and causes unnecessary overhead of managing 2 CPU virtualizations. Is that true?

Any suggestions on leaving the guest VM's CPU's to 1 or increasing it to 2 if the host machine is Quad Core based? (I use the VM as my development machine, and it has Oracle 10g, Apache and Tomcat servers running on it. I also run Oracle JDeveloper on it. )

thanks much.

Click to view oreeh's profile Guru 9,872 posts since
Nov 30, 2005
I'd only increase the number of vCPUs if the application inside the guest really takes advantge of SMP (MSSQL server is an example of that).
And as long as there isn't a performance problem with 1 vCPU I also don't see a reason to increase the number of vCPUs regardless if the applications takes advantage of SMP.
Click to view oreeh's profile Guru 9,872 posts since
Nov 30, 2005
Also see the following docs and threads (they are for ESX but interesting anyway):

Co-scheduling SMP VMs in VMware ESX Server
VMkernel Scheduler
Multiple vCPU's (SMP); convincing the business
Click to view oreeh's profile Guru 9,872 posts since
Nov 30, 2005
This really depends on the guest and its utilization and I don't think that there's "one answer to all".

There definitely is a performance impact from the scheduler.
And I'm pretty sure that co-scheduling isn't available in Workstation which makes things even worse.

On the other hand: if the performace of the guest is bad and CPU utilization of the guest is maxed
out pretty often then there is a good chance that vSMP will improve things.

This however also depends on the other VMs running on the host!
Multiple VMs competing for 4 cores can be a problem, especially when using vSMP VMs.
With the hosted products (Workstation, Server, Fusion) to be safe I'd calculate only three cores
available in a quad core system, since the host OS (and the VMware processes) compete for the CPU too.

If you try it make sure to update the HAL, otherwise your results will be bad.

Message was edited by: oreeh

Any percentage only would be a guess ... if you want to get numbers I'd suggest we move this post to the performance forum.
Click to view oreeh's profile Guru 9,872 posts since
Nov 30, 2005
Be aware that this paper is based on ESX not Workstation (although the effect with Workstation is similar).

Adding more vCPUs to a VM will max out the host's CPUs but that is different to adding another single vCPU VM.

I'm still assuming co-scheduling isn't available in Workstation for the following:

When a vSMP VM runs it can only be scheduled if the appropriate number of physical cores is available.
When scheduling a single vCPU VM only one core needs to be available.

Assuming four cores, and four VMs:
with only UP VMs three (sometimes four) VMs can be scheduled at any time
with one vSMP and three UP VMs either three UP VMs can be scheduled at any time or one UP and one vSMP VM can be scheduled.
This clearly decreases overall performance but might increase the performance of the vSMP VM.

And if we assume six or eight VMs it even gets worse.
You probably won't notice a performance decrease of the UP VMs (unless of course they are heavily utilized) but you will notice a performance decrease of the vSMP VM.

If however you are only running one VM it won't matter much.
Click to view oreeh's profile Guru 9,872 posts since
Nov 30, 2005
Co-scheduling is available in ESX 3.x and ESXi.
I don't think we'll ever see it in another VMware product (Server, Workstation, ...), regardless of the host OS,
as (from my understanding) there needs to be some kernel support to do this.

Depending on your needs and your environment ESXi could be worth a try.

Message was edited by: oreeh

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities