VMware Cloud Community
seveler1
Contributor
Contributor
Jump to solution

Dual Processor VMs

We have dual processor, dual core hosts. (2.6 amd with 16 gb ram) In the past I was suggested/told not to do a dual proc vm because if it took both cpu's then it could have an effect on the host. this is back before dual core. Does that still exist today?

I am about to move my accounting app to a vm and was going to give it dual cpu's for max performance.

Please help!

Reply
0 Kudos
1 Solution

Accepted Solutions
Ken_Cline
Champion
Champion
Jump to solution

And just to make sure I wasn't misunderstood - vSMP does have its place. That place is as Edward, Tom, and others have said - with workloads that can truly take advantage of the extra processor. The thing that you must be aware of is that, due to the scheduling issue discussed above, a vSMP VM will have a more significant impact on the overall host performance than a single vCPU VM. If you weigh the costs and benefits and you decide that two (or more) vCPUs are worth it...go for it!

Just do us all a favor and DON'T make the mistake that a lot of people made when vSMP was first introduced...making vSMP your default VM configuration. Folks just figured that hey, all my physical servers have two CPUs, why not my VMs...I remember walking into many datacenters where people were very disappointed with their ESX performance and - low and behold - they had ten vSMP VMs running on a dual socket, single core host! A couple quick HAL downgrades and .vmx edits later and viola! happy customers Smiley Happy

Ken Cline

Technical Director, Virtualization

Wells Landers

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/

View solution in original post

Reply
0 Kudos
24 Replies
ssumichrast
Enthusiast
Enthusiast
Jump to solution

I've always been told to not give VMs multiple cores, even in dual and quad core configurations. I have the technical reasoning for it, but I'm pretty sure that if I try to explain it, I will butcher it Smiley Wink

christianZ
Champion
Champion
Jump to solution

Still true - avoid multi-vcpu vms, when not needed. Remember if you have e.g. 2 idle cores and 2 vms want to use it (one with 2 vcpus and one with 1 vcpu) then only one vm can run at once (either the one with 2 vcpus or the one with 1 vcpu - not both concurrently), i.e. when the 1-vcpu's vm runs the second core stays idle and the 2-vcpu's vm must wait (that all simplified).

Only when you have an application that can use multiprocessors efficiently and it needs more cpu power the multi vcpu vm will make sinn.

By multi cpu vms don't forget to change the HAL to multiprocessor.

seveler1
Contributor
Contributor
Jump to solution

In my situation dual proc, dual core ESX is not going to let one vm (single proc) access one cpu and the other vm (dual proc) access the other dual core cpu?

Is it best to have a quad proc, quad core if you are going to run dual proc vms?

Reply
0 Kudos
Ken_Cline
Champion
Champion
Jump to solution

Best practice is to configure all VMs with a single vCPU. This will enable maximum efficiency in scheduling of vCPUs to execute on pCPUs. If you MUST have vSMP-enabled VMs, then limit them to as few as possible per host. Regardless of what you are running as far as the number and type of VMs, you will achieve maximum performance by having more vmkernel scheduling targets (i.e. pCores) - so, if you have the option of dual core or quad core, you're better off with the quad core (except in a few edge cases where clock speed is more important than concurrent execution).

Remember that there are always some "overhead" tasks executing (the vmkernel, the service console, etc.) in addition to your VMs. If you have two dual-proc VMs running on a two socket, dual core box, then the likelihood of being able to have both running at exactly the same time is pretty low (the vmkernel has to perform scheduling tasks, network I/O tasks, storage I/O tasks, memory management tasks, etc. and the service console has to perform management tasks) - and each of those tasks requires time on a pCPU. In order for a dual vCPU VM to be allowed to execute, it must have two scheduling targets (pCores) available AT THE SAME TIME.

So...the moral of the story is: Limit the number of vSMP VMs as much as possible (zero is a very good number) - and provide the vmkernel with as many scheduling targets (pCores) as possible.

Ken Cline

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
Reply
0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

As a follow on to what Ken.Cline states....

There are very few SMP applications for Windows. For example out side of SQL, Exchange, and some 3rd party products most Windows applications do not use the 2nd processor for anything, so it just idles while the main vCPU is doing the work. If the application you are going to run is not SMP do not add more than one vCPU.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Reply
0 Kudos
FredPeterson
Expert
Expert
Jump to solution

I would qualify that by stating that it depends on the kind of environment. For instance Business Objects XI can launch multiple JobServerChild processes. The application isn't SMP aware, but the fact that multiple processes will want to run at once means multiple CPU's is very beneficial to getting the job done quick.

Reply
0 Kudos
dmorgan
Hot Shot
Hot Shot
Jump to solution

I know far less than the previous two posters, however there are definitely some situations in which multi-processor VM's are advantageous. We have some Oracle servers virtualized. These machines definitely ARE multi-processor aware. While it CAN take longer should the ESX server be in contention for CPU cycles, so long as it is not there are really no issues with using multi-cpu VM's, again, so long as the application will actually USE those additional CPU's.

If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points

If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points
Reply
0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

I agree, As Ed stated SQL and Exchange, when I last looked Oracle was still an SQL engine Smiley Wink are one of the few applications that will benefit from vSMP, however best practice is to use Single vCPU to maximise guest performance regarding CPU scheduling, that said, if you have the recourses and the application needs it, it does not preclude the use of vSMP.

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
Reply
0 Kudos
Ken_Cline
Champion
Champion
Jump to solution

And just to make sure I wasn't misunderstood - vSMP does have its place. That place is as Edward, Tom, and others have said - with workloads that can truly take advantage of the extra processor. The thing that you must be aware of is that, due to the scheduling issue discussed above, a vSMP VM will have a more significant impact on the overall host performance than a single vCPU VM. If you weigh the costs and benefits and you decide that two (or more) vCPUs are worth it...go for it!

Just do us all a favor and DON'T make the mistake that a lot of people made when vSMP was first introduced...making vSMP your default VM configuration. Folks just figured that hey, all my physical servers have two CPUs, why not my VMs...I remember walking into many datacenters where people were very disappointed with their ESX performance and - low and behold - they had ten vSMP VMs running on a dual socket, single core host! A couple quick HAL downgrades and .vmx edits later and viola! happy customers Smiley Happy

Ken Cline

Technical Director, Virtualization

Wells Landers

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
Reply
0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

You and me both Ken, unfortunately I am still finding that. 😮

Tom Howarth

VMware Communities User Moderator

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
Reply
0 Kudos
Jonas_B
Contributor
Contributor
Jump to solution

A question I have thats kind on topic regarding vCPU's and pCPU's:

Are there any numbers of recommended vCPU's per pCPU in a production enviremont. Of course the number vary depeding on how CPU-intensive the VM's are.

What I've noticed in our enviroment was that when one of our hosts (8 physical cores) had around 40 VM's on it (mostly single-core vms but there may have been 1 or 2 dual-core) we had alot of slowdowns on the VM's. And the VM's was not that CPU-intensive.

Reply
0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

if your slow downs were on the dual vCPU machines, that would indicate a scheduling issue, this is due to the fact that a Dual vCPU machine requires 2 phyiscal cpu/cores to be available per instruction set. this would also cause your single vCPU machine to slow down as there would be 2 cores removed from the fray every time a SMP guest was processing.

my gut feeling is that if you removed the SMP guest and replaced them with single CPU guest, the overall performance of that Host would actually increase.

Tom Howarth

VMware Communities User Moderator

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
Reply
0 Kudos
azn2kew
Champion
Champion
Jump to solution

Standard ESX VMs build is to start with single vCPU and 2GB of RAM and than increase it as you see fits. Do not over allocated unnecessary resources epecially with vCPU. Unfortunately, working with Oracle & GIS applications, it is heavily utilize vSMP features and yes it work as we expected. On the other hand, majority of Windows applications are not vSMP aware so don't waste your resource and experience bottleneck issues. My rules of thumb is consult with the application vendor and asked exactly what's the requirements and does it work well under ESX virtualization and vSMP and if it confirmed that it will work fine with vSMP than you can allocate vCPU as it fits. CONSULT WITH APPLICATION VENDOR TO BETTER UNDERSTAND THE APPS.

Regards,

"The Power of Knowledge"

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos
Ken_Cline
Champion
Champion
Jump to solution

A question I have thats kind on topic regarding vCPU's and pCPU's:

Are there any numbers of recommended vCPU's per pCPU in a production enviremont. Of course the number vary depeding on how CPU-intensive the VM's are.

Typical "rule of thumb" is four to eight vCPUs per pCPU core. As you said, this is highly workload dependent.

What I've noticed in our enviroment was that when one of our hosts (8 physical cores) had around 40 VM's on it (mostly single-core vms but there may have been 1 or 2 dual-core) we had alot of slowdowns on the VM's. And the VM's was not that CPU-intensive.

You'd have to look at a lot more to make a determination. How was your vRAM allocated? For most Windows VMs, you can get by quite comfortably with only 512MB of RAM (yes, that's 512MB - and that's being generous!). If your committed RAM exceeds the physical RAM in your host you can wind up swapping, which will kill your performance.

Ken Cline

Technical Director, Virtualization

Wells Landers

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
Reply
0 Kudos
seveler1
Contributor
Contributor
Jump to solution

I agree with Jonas with the memory. I take the default that vmware

gives which I think is 256 and kick it up when I see problems. I have a

350 user exchange box with 1 cpu and 1 gb of ram.

Thanks,

Scott Eveler

Reply
0 Kudos
Jonas_B
Contributor
Contributor
Jump to solution

We always give our vm's as little ram as possible in the beginning and raise it if needed. So the ram was no problem when theese slowdowns occured. I reckon we used about 65-70% per host. We have 32gb per host.

Reply
0 Kudos
dmorgan
Hot Shot
Hot Shot
Jump to solution

Just out of curiosity, what are people giving their exchange servers that are running as VM's for memory/proc's? We are a small/med. sized company, and right now we are on SBS 2003. That server has 4GB of RAM and dual quad-core proc's. We are up against our limit in email addresses and AD accounts, as well as having issues with SBS not allowing trusts between domains. This, we would like to upgrade to Exchange, possibly 2007, and split off AD/DNS/DHCP/etc.. to a separate box. I think that these two new machines would be excellent VM candidates. The AD box would probably not need a whole lot of memory/processing power, but I am not sure what the Exchange box would need. We have 4 ESX servers running on Dell 1955 Blades with 32GB RAM on each, and very few VM's, so I have the processing and memory to spare. However, the more I can squeeze onto VM's, the better, imho. I just don't want to give the Exchange box a single vCPU, and later have to change the HAL to accomodate a multi-proc system later on. 1GB of RAM seems low to me for an Exchange box, but running on the SBS server that does everything, not just Exchange, the memory is definitely bloated I think compared to an Exchange box that just does mail services.

Also, I read in a past thread somewhere about loading the multi-cpu HAL, but just giving the system 1 virtual proc. Is there any reason anyone would advise against this? My thinking is that I can just create a template with the multi-proc HAL, and a single virtual proc, so that I have the ability to add procs easily if needed, but not until they are needed.

If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points

If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points
Reply
0 Kudos
seveler1
Contributor
Contributor
Jump to solution

We are a 350 user shop. Our exchange box is a 1 vcpu box with 1 gb ram.

The box runs about 25-30% cpu during the day and memory is less than

25%. The memory is easily adjusted so try and see what works for your

environment. With VMWare you can separate the servers out so get after

it. We are 100% virtual except for the backup server.

Email me if you want more about our environment.

Thanks,

Scott Eveler

Reply
0 Kudos
Ken_Cline
Champion
Champion
Jump to solution

Also, I read in a past thread somewhere about loading the multi-cpu HAL, but just giving the system 1 virtual proc. Is there any reason anyone would advise against this? My thinking is that I can just create a template with the multi-proc HAL, and a single virtual proc, so that I have the ability to add procs easily if needed, but not until they are needed.

Don't do it. The change from single CPU to multi-CPU HAL is painless...Windows will recognize the additional CPU and Plug & Play will do its thing. It's the downgrade that's a pain in the butt. Running the multi-CPU HAL with only one CPU has been known to cause erratic CPU utilization and is not recommended.

Ken Cline

Technical Director, Virtualization

Wells Landers

VMware Communities User Moderator

Ken Cline VMware vExpert 2009 VMware Communities User Moderator Blogging at: http://KensVirtualReality.wordpress.com/
Reply
0 Kudos