Sashkin - Fotolia
When configuring Hyper-V virtual processors for a VM, you must ensure the workload has enough resources to run smoothly, but not so much that resources go to waste. A best practice is to start with two virtual processors and go from there, but there are additional steps you should take beforehand to reduce CPU overhead and gauge performance.
First, it's important to understand that a VM's CPU is equal to the number of threads it can execute at a given time. If your Hyper-V host has only two CPUs, you can't allocate more than two vCPUs to a Hyper-V VM.
A Hyper-V VM can operate successfully with one vCPU if it only needs to run OS processors because they don't require as much processing power. However, when it comes to deciding how many Hyper-V virtual processors you need for VMs that run line-of-business applications, the processing power required by the VM completely depends on the applications running inside it.
Although you can follow the best practices for configuring virtual processors provided by the application vendor, you might not want to follow exactly what is written if you have other critical production VMs that might require more processing power. There is no hard rule when it comes to configuring Hyper-V virtual processors for a VM. You need to check how a new VM performs on the Hyper-V host.
I recommend following this approach:
Step 1: Install a VM with the latest OS and make sure to install the latest Integration Services pack. Integration Services provide Microsoft Virtual Machine Bus drivers that can significantly reduce CPU overhead.
Step 2: Keep all of the other VMs running on the same Hyper-V host so you can see how the new VM will behave while other production VMs are in use.
Step 3: Configure the new VM to run with two virtual processors to start. It's absolutely necessary that you start by assigning two virtual processors to the new VM before you decide to increase that number.
Step 4: Detect bottlenecks using Performance Monitor. Next, check if the VM can work efficiently with two Hyper-V virtual processors. Use Performance Monitor on the host and check the Hyper-V Hypervisor Virtual Processor: Total Runtime counter. If the counter shows over 90% for the virtual processor, consider adding more virtual processors to the new VM and then repeating this step.
Dig Deeper on Microsoft Hyper-V management
Related Q&A from Nirmal Sharma
VHD File Set -- a file format new to Windows Server 2016 -- is helpful for IT administrators using guest clusters. Get up to speed on the basics and ... Continue Reading
Download and install Microsoft Virtual Machine Converter to gain access to several PowerShell commands that enable VMware VMDK to Hyper-V VHDX ... Continue Reading
Save time by using PowerShell commands to reconnect your VMs to a new Hyper-V virtual switch. Different commands can access single VMs or many VMs ... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.