VMware Cloud Community
amvmware
Expert
Expert
Jump to solution

Physical cpu requirements for vCPU

My understanding was for a virtual machine to have 2 or 4 vCPU's you had to have the corresponding number of physical CPU's in the esx host.

I had a capacity planner performed recently and for a esx host with a single dual core processor the CP indicated i could host VM's with 4vCPU's. - this has confused me a little, can anyone shed any light on this.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
rossb2b
Hot Shot
Hot Shot
Jump to solution

Hopefully this will clear things up in regards to your question - from Basic System Administration ESX Server 3.5, ESX Server 3i version 3.5 Virtual Center 2.5

"Virtual SMP can use two-way or four-way SMP. Virtual machines can not have more virtual CPUs than the actual

number of logical CPUs on the host-that is, the number of physical processor cores if

hyperthreading is disabled or two times the number of physical processor cores if

hyperthreading is enabled."

View solution in original post

Reply
0 Kudos
8 Replies
RParker
Immortal
Immortal
Jump to solution

You could host VM's with 4 vCPU IF those processors were hyperthread.

It's not a good idea to have multi-cpu VM's anyway, unless you know exactly what you are doing.

The capacity planner doesn't take into account the processors or type. It assumes that people have at minimum dual socket / dual core processor, thus the 4 CPU allowance.

But just because you CAN use 4 vCPU doesn't mean you SHOULD. Test your app and be absolutely certain that it can't work with 1 CPU. adding more CPU can affect performance of your host if you are not careful.

Cloneranger
Hot Shot
Hot Shot
Jump to solution

Yes as said in the last post,

Too many vCPUs in your VMs can cause the hosts scheduler to constantly juggle,

Besides VERY few apps do multithread to 4 cpus effectively,

Under Windows Server, I would say only MS SQL Server and MS Exchange are worth 4 vCPUs on,

Most of my apps use 1 and a few use 2.

rossb2b
Hot Shot
Hot Shot
Jump to solution

Hopefully this will clear things up in regards to your question - from Basic System Administration ESX Server 3.5, ESX Server 3i version 3.5 Virtual Center 2.5

"Virtual SMP can use two-way or four-way SMP. Virtual machines can not have more virtual CPUs than the actual

number of logical CPUs on the host-that is, the number of physical processor cores if

hyperthreading is disabled or two times the number of physical processor cores if

hyperthreading is enabled."

Reply
0 Kudos
amvmware
Expert
Expert
Jump to solution

I understand the issues around not having 4VCPU's and the hyperthreading option.

The confusing point was the capacity planner output - so say for example i create a server template based on a HP dl360 and lower the processor count from 4 to 2 processor cores, you are saying modifying the processor count below dual processor and dual core will not create a scenario based on that configuration. Instead it will assume the minimum configuration of dual processor/core.

Would the same situation apply if i had a single quad core processor - ie is the problem that the CP assumes 2 processors as the minimum license for an esx host is a 2 processor license.

Reply
0 Kudos
Cloneranger
Hot Shot
Hot Shot
Jump to solution

You're reading a little too much into your CP output I think,

If its saying a 4vCPU VM could run on a host with only 2 logical cpus, then it is wrong.

If It assumes dual cpu machines will be used, its probably because hardly anyone would put in hosts without dual cpus. Seeing as maximising hardware utilization is the general idea for most looking at the product. You could I believe use a 2 cpu license on 2 hosts with 1 cpu in each, 'but why would you want too?' is their reasoning.

Reply
0 Kudos
amvmware
Expert
Expert
Jump to solution

Thanks for the input - you have all confirmed what i understood to be the physical CPU to vCPU requirements. My primary issue now is with the output from the capacity planner - which i am trying to resolve via vmware.

Thanks

Reply
0 Kudos
DpresidentRC2
Contributor
Contributor
Jump to solution

I have a similar question to the original post:

I have 8 logical CPUs for the host, why can I only present 4vCPUs - Is there a setting I can change?

Reply
0 Kudos
jhanekom
Virtuoso
Virtuoso
Jump to solution

vSMP currently supports a maximum of four vCPUs. It would be very rare indeed for a processing load to need that much processing power and, invariably, the recommendation on these forums would be that if it truly requires that much processing power, it's likely "not a good candidate for virtualisation."

There are significiant overheads in adding additional processors in a virtualised environment due to the way processor scheduling has to be dealt with (the vCPU's will need to be co-scheduled to ensure the VM runs properly, which means that the platform may have to introduce wait periods for some CPUs in order to achieve co-scheduling.)

For that reason, the rule when it comes to vSMP is "less is more." Only allocate more CPUs if your application is truly struggling with one, and also only if the application is multi-threaded.

Regarding capacity planner recommending virtualising 4-CPU boxes onto systems with 2 cores: If the physical system is using 5% of four CPUs, I don't see why it should be a problem virtualising it onto a 2-CPU system. Clearly the number of vCPUs will have to be reduced, but it wouldn't present a load problem.

Reply
0 Kudos