VMware Cloud Community
beckhamk
Enthusiast
Enthusiast

2vcpu vms on 2 proc hosts

I have read over the many docs and suggestions about configuring vm's to use a single vcpu and that you should not setup vcpu vm's on a dual proc machine. but i have a question. What if you had a quad core dual proc esx host and you setup only 4 vm's each being 2vcpu vm's. Then pinned each vm's two vcpu's to two cores. Would this configuration help get around the scheduling and vm performance issues on a dual proc host?

0 Kudos
3 Replies
Dave_Mishchenko
Immortal
Immortal

With only 8 virtual CPUs and 8 physical CPU cores on the host I wouldn't worry about setting affinity. ESX will have plenty of freedom to schedule CPU resources for your VM. If you had 16 vCPU and 4 physical CPU cores, then that would be another matter. As you've read ESX would have to find 2 cores that are free at the same time and that could become an issue if the server was heavily loaded. But in your case I would just leave things as is. A virtual CPU can at most only run at the speed of one CPU core, so if one of your one of your VMs was at 100 % CPU ,this would only be using the equivalent CPU resources of 2 cores.

0 Kudos
beckhamk
Enthusiast
Enthusiast

so why is it everyone is saying not to use 2vcpu vm's on a dual proc esx host with other single vcpu vm's? I thought it was the opposite? as in the more physical procs you have the easuer it would be for 2 vcpu vm's.

0 Kudos
Dave_Mishchenko
Immortal
Immortal

The more cpus a host has, the easier it is for ESX to schedule dual or quad vCPU VMs. 2 or more years ago, you would have been told to avoid using dual vCPU VMs on dual processor hosts as the host only would have had 2 CPUs. Now you typically have 8 CPUs in a dual processor server, so ESX now has 8 cores to schedule with rather than just 2.

In general, it is still to start with single vCPU machines regardless of the number of core you have, but if you need to have 4 dual vCPU VMs on your server, it's far less of a concern these days. And I don't mean that as a blanket statement to start loading up your host with more dual vCPU VMs, but with just 4 you'll be fine without affinity.

0 Kudos