Using Hyper-V Virtual Machine Processor Resource Control   1 comment

How a Virtual Machine Uses Host Logical Processors

A logical processor (LP) is a thread of execution on a host. Let’s look at three example hosts.

Host Name Physical Processors Hyper-threading Enabled? Logical Processors
Host1 Dual Intel 4-core (8 cores) No 8
Host2 Dual Intel 8-core (16 cores) Yes 32
Host3 Dual AMD 12-core (24 cores) N/A 24

Host1 has eight cores with Hyper-threading disabled. There are eight threads of execution or LPs on that host. Host2 has 16 cores; each core has two threads thanks to Hyper-threading, so there are a total of 32 LPs on that host. Host3 has AMD processors (Hyper-threading is an Intel CPU function) with a total of 24 cores; without Hyper-threading there are 24 LPs on this host.

Note: Hyper-threading does not double the power of a processor. It allows more multitasking and can add a small percentage to a host’s capacity with recent processors. Only on older processors does enabling Hyper-threading have a negative impact on performance for Hyper-V.

When a virtual machine runs on a host, it is sharing the resources of that host, including the processor capacity. A virtual machines virtual CPUs (vCPUs) do not permanently sit on the LPs that run them. Just like with applications on your PC, each virtual machine gets a slice of time to run. The VM is swapped on and off the physical processors of the host to allow other VMs to share those LPs. This might sound bad at first, but virtualization exists in the first place because the majority of servers were greatly underusing their CPU capacity. The virtual machines swap in/out so quickly that we humans do not normally notice. But sometimes those virtual machines need to be able to guarantee physical processor capacity to more horsepower-hungry services.

how virtual machines use logical processors

How virtual machines queue up to run on a host’s shared logical processors.

Virtual Processor Resource Control

Hyper-V gives us the ability to manipulate how any virtual machine’s vCPUs utilize the LPs of a host. This is known as resource control. You can configure a virtual machine by editing the settings and browsing to Processor. Note that the VM must be powered down to edit these settings.

This is the location where you can configure the number of vCPUs that a VM has. Doing this allows a VM’s guest OS to have the ability to schedule more or fewer parallel tasks. This is useful for multithreaded services such as SQL Server or SharePoint. Doing this needlessly blocks the LPs of a host from being used by other VMs while the over-resourced VM is executing.

Manipulating the scheduling of virtual processors

Virtual processor resource control settings.

Here is also where you will find the Resource Control settings where you can control how LP capacity is scheduled for your virtual machine.

Virtual Machine Reserve (Percentage) is probably the most interesting setting. This is a guarantee of LP capacity for the virtual machine. If your virtual machine has two vCPUs and you set this setting to 100 percent then that virtual machine will be guaranteed two logical processors. No other virtual machines will be scheduled for those logical processors. This is useful for processor-hungry services such as SharePoint. Note that:

  • Some software support statements urge you to enable this setting to 50 or 100 percent.
  • This is probably how Windows Azure is enabling non-sharing of processors to the small (1 vCPU) and larger virtual machine specifications.

The Percent Of Total Resource display is a calculation of how much of the host’s total LP capacity will be assigned to this virtual machine. This setting is important to note – if you reserve 100 percent for every virtual machine then you won’t put many virtual machines onto each host!

This setting is rarely looked at in the real world by most virtual administrators, and really should only be configured for those services that require it. In a cloud there should be a higher cost for any templates that are configured with this setting.

Virtual Machine Limit (Percentage) restricts how much of the assigned LPs that this virtual machine can consume. By default, a virtual machine can use up to 100 percent of the capacity; this is used in conjunction with virtual machine processor pressure (or demand) along with the Relative Weight setting to balance the scheduling of virtual machines on the LPs.

I have never seen Virtual Machine Limit (Percentage) being used outside of a “what does it do?” scenario. It might be useful if some troublesome virtual machine does run away from time to time. Remember that you can only edit these settings while a virtual machine is powered off.

Relative Weight is used to manipulate the scheduling of virtual machines that are competing for shared (by default) LP resources. This setting is 100 by default. You can skew the weight of a VM by changing the setting. Valid values range from 0 to 10000.


Posted 26/03/2014 by Petri in VMware

One response to “Using Hyper-V Virtual Machine Processor Resource Control

Subscribe to comments with RSS.

  1. VMware Certified Advanced Professional 6 (Desktop and Mobility Deployment) – The industry-recognized VCAP6-DTM Deploy certification validates that you know how to deploy and optimize VMware Horizon 6 (with View) environments. It proves that you have the understanding and abilities vital to leverage best practices to provide a scalable and reliable Business Mobility platform for your organization. Some of the subject areas involve: Configuring and managing Horizon View components, configuring cloud pod archituecture, configuring Group Policy settings related to Horizon View, Configuring and optimizing desktop images for Horizon View & Mirage, Configuring and managing App Volumes AppStacks, Configuring desktop pools, Configuring and deploying ThinApp packaged applications, Configuring VMWare Identity Manager, etc.Sebastian’s take on the VCAP6 examination: “In my viewpoint VCAP6 examination is much better experience as compared to VCAP5, the newest exam looks just like VMware HOL. The interface is straightforward, questions are sorted on the right section of the screen, and can be concealed to the side or restored when desired. My bits of advice to the questions window: if you want to make it floating, you better know how to restore it back. I ended up shifting it around simply because I fail to remember how to restore it back. The two arrows that looked like buttons on top were supposed to dock the window to right or left. Fonts could be resized, which i think was considerably better than scrolling up and down the question. The reaction speed of the whole user interface was considerably faster than VCAP5.5, and there was no lagging time period experienced when changing from window to window. Something to bear in mind: BACKSPACE key is not working! I think this is good because you don’t reload your examination window by mistake, then again, it can be irritating at times whenever you type something mistakenly and you have to select and press Del to remove. The Desktop and shortcuts were arranged really well, and all important applications like web browser or Mirage console can easily be launched. There is a very good user interface for Remote Desktop Manager where you’ll discover all necessary RDP connection to servers or desktops without the need to type username and password. The web browser had all the links in the Favorite Bar. Right at that moment I’m penning this, there’s no extra Thirty minute extension for Non-Native English speaker at No-Native English country, which is actually a bummer. You will find 39 question to fill out within the 3 hours period, which can be actually quite hard for non-native English speakers just like me. A number of questions take time to complete, therefore it is wise to neglect the questions that you cannot answer, and finish those you are able to. By the end of the 39 questions, you can return to the uncompleted questions in case you still have time. Never waste a long time on one single question! The examination blue print can be found on my blog at It is well organized and following it for the exam preparation can help a lot. Not surprisingly, the best is if you could have plenty of hands on experience! I’m in fact very happy with the exam experience, even though I passed this time by small margin, however i really know what I missed for the examination, find out from the mistakes and practice harder to familiarize myself with the environment. This accreditation is sure to open up your job prospects!”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: