A. Virtualization abstracts the physical hardware from the virtual machine (VM). For example, a physical box may have four cores. You can allocate each VM a certain number of virtual CPUs (i.e. Hyper-V supports up to four virtual processors for each VM). The question is, then, if you have four physical cores, should you only allocate a total of four virtual processors across all VMs? This would limit you to running only four VMs, with one virtual processor each.
Normally, the hypervisor will dynamically execute instructions based on core availability, and won't lock one VM's virtual processor to a specific physical core. Remember that you virtualize to consolidate and get better utilization out of your available hardware. If you only allocate one virtual processor to each physical processor, you're likely to have lots of idle time, because each VM is unlikely be using 100 percent of its CPU.
Therefore, the recommendation is to allocate more virtual processors than you have physical processors and let the hypervisor take care of scheduling the CPU work across the physical cores. Microsoft typically recommends you have no more than eight virtual processors per physical core.
The exact number of virtual processors and VMs you run on a server will depend on the workload of the VMs. If you have a large number of VMs that are typically idle, you could run many VMs on a single processor without seeing a performance degradation. If your VMs have very high CPU usage, however, you would be able to run far fewer. You should perform benchmarking and data gathering of the VMs and physical servers that you plan to virtualize to understand CPU, memory, network, and disk I/O requirements before selecting the virtual host. Technologies such as System Center Virtual Machine Manager with System Center Operations Manager use statistics gathered from the virtual and physical machines to perform the best placement on the available virtual hosts.
- Virtualization Myths and Misconceptions
- Q. I'm seeing a big performance difference with my live migration operations when I use Cluster Shared Volumes (CSV), is this normal?
- Q. How can I list all applications being published from a Windows Virtual PC virtual machine (VM)?
- Q. Why are my virtual machines (VMs) migrated between nodes in a cluster using Quick Migration instead of Live Migration when I shut down a cluster node?
Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.