VMware Cloud Community
mcsnott
Contributor
Contributor

1 virtual CPU quicker than 4?

I have 5 VMs on a ESX 3.0.1 host all Windows 2003

The host has a single XEON quad core

Should I be assigning 4 Virtual CPU to each VM or 1 Virtual CPU?

Some stuff I have read suggest it would be better to have single CPU for each VM.

Thanks

Reply
0 Kudos
8 Replies
Gabrie1
Commander
Commander

You should only assign more the one vcpu to a VM if the apps running in it realy benefit from more cpu's. There are a lot of apps that don't know how to fully use an extra cpu.

What ESX is concerned. When finding a free slot to let the VM perform its cpu tasks, it will always let all v-cpu's run at the same on a p-cpu. If your VM has one v-cpu, ESX has to find a moment in which at least one p-cpu is available for the VM.

But when you have a VM with 2 or 4 v-cpu's, ESX has to find a moment in which 2 or even 4 p-cpu's are available. On a busy host, this sometimes can take a little more time then to just shedule a single v-cpu.

In other words, if you have dumb apps, that don't really use multiple cpu's, yes a 2 or 4 v-cpu VM can be slower then a single cpu vm. On the other hand, if the app realy knows how to fully utilize those cpu's, the VM can bennefit from 2 or 4 v-cpu's.

In those situations it all depends on testing the speed differences for your app.

Ps: Be aware that upgrading a Windows2003 VM from 1 to 2 or 4 cpu's usually is no problem. But downgrading to single cpu, is not officially supported by MS. Although you'll find a number of postings about it in the forum.

Gabrie

http://www.GabesVirtualWorld.com
Reply
0 Kudos
esiebert7625
Immortal
Immortal

Only some apps like SQL/Oracle/Exchange servers are good vSMP servers. You can actually slow the server down by assigning it an un-needed additional processor. Check out the links below...

ESX Server 2 Best Practices Using Vmware Virtual SMP - http://www.vmware.com/pdf/vsmp_best_practices.pdf

To vSMP or not to vSMP - http://www.vmware.com/community/thread.jspa?messageID=298150&#298150

ESX Server CPU Scheduling - http://www.vmware-tsx.com/download.php?asset_id=39

Fyi…if you find this post helpful, please award points using the Helpful/Correct buttons.

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website: http://vmware-land.com

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Reply
0 Kudos
petedr
Virtuoso
Virtuoso

Interesting point, for most of our VMs we usually set just a single CPU although for our Oracle database we did give it 2 CPUs.

www.thevirtualheadline.com www.liquidwarelabs.com
Reply
0 Kudos
jeremypage
Enthusiast
Enthusiast

Even if the VM can take advantage of vSMP you probably want to give it a max of 3 CPUs.

Reply
0 Kudos
Gabrie1
Commander
Commander

Even if the VM can take advantage of vSMP you

probably want to give it a max of 3 CPUs.

Hi

Can you explain why? Because three seem to be a strange number of cpu's and I was wondering if you have been doing some testing on it?

Gabrie

http://www.GabesVirtualWorld.com
Reply
0 Kudos
peetz
Leadership
Leadership

BTW, the issue with not being able to downgrade Windows 2003 from multi- to single-CPU has finally being resolved by Microsoft. It is possible and supported with SP2. See KB923425[/url].

Anyway, like explained above, you should always start with a single CPU and scale up only if the application needs and supports multiple processors.

\- Andreas

Twitter: @VFrontDe, @ESXiPatches | https://esxi-patches.v-front.de | https://vibsdepot.v-front.de
Reply
0 Kudos
esiebert7625
Immortal
Immortal

I think he means one less then the 4 total CPU's. It's generally not a good practice to assign a 4 vCPU's on a 4 physical CPU server because the Service Console needs CPU time also on CPU0.

Reply
0 Kudos
bertdb
Virtuoso
Virtuoso

Anyway, like explained above, you should always start

with a single CPU and scale up only if the

application needs and supports multiple processors.

Definitely. Giving a VM multiple vCPUs makes it a lot harder to schedule that VM. The VMkernel has a much easier job scheduling single-vCPU VMs.

In your case, the VMkernel has to free all cores to schedule a 4-vCPU VM. Whenever the VMkernel or the Service Console or some other VM need to do something, a 4-vCPU VM can't run at the same time.

Moreover, when your VM isn't doing 4 things in parallel, it's throwing away the CPU resources that the VMkernel fought to reserve for your VM.

Reply
0 Kudos