Hyper-V: Integration Components and Enlightenments

In order to get the most from your VM’s it is good to understand a couple of concepts that can impact the performance and operation of your Virtual Machines. Here are some the concepts I’ll describe below;

· Integration Components

· Synthetic vs. Emulated Devices

· Operating System Enlightenments


Integration Components:

Integrations components (ICs) are sets of drivers and services that help your Virtual Machines have more consistent state and perform better by enabling the guest to use synthetic devices. Some ICs that come with Hyper-V are VMBUS (transport for Synthetic devices), Time Sync (used to keep VM clocks in sync with the root partition sometimes called the host), Video Driver, Network Driver, Storage Driver, …


You can tell you have these components installed by looking for VMBUS driver and “Virtual “ & “VMBus” in device names in the device manager. If a SCSI drive is attached you will also see the “StorVSC” driver. Since this is Beta we may update any or all of the naming.


Windows Server 2008 will come with the integration components pre-installed. For other operating systems you can use the “vmguest.iso” image in the %SYSTEMROOT%\system32 directory. A simpler way to install ICs is to use the vmconnect (console gui) and select Action->Insert Integration Services Setup Disk. You may need to kick off setup manually depending on how autorun is configured – just inserting the CD doesn’t guarantee the ICs are installed.


Synthetic vs. Emulated Devices:

Synthetic devices are new with Hyper-V and are designed to have the lowest overhead for devices. These devices package requests and forward them to the StorVSP driver in the root over VMBUS which then forwards them to the device after any needed processing. Emulated devices on the other hand emulate a real piece of hardware and emulation happens in the vmwp.exe process (one per VM).


Both types of devices are important and here are some reasons why. The most important reason for having emulated devices is to support operating systems that do not have “Integration Components” installed. The emulated devices can also be thought of a boot strapping devices since the preference should be to use the virtual devices (keep in mind the boot IDE drive uses a filter driver after boot for improved performance if ICs are installed). The Synthetic devices are important because they help reduce the CPU overhead when accessing a device.


To see what OS’s we’ve thought about for synthetic devices see the following blog https://blogs.technet.com/windowsserver/archive/2007/12/12/Yes_2C00_-Virginia_2C00_-there-is-a-Hyper_2D00_V-beta.aspx


Operating System Enlightenments:

Enlightenments are enhancements made to the operating system to help reduce the cost of certain operating system functions like memory management. One example of an OS enlightenment that comes with Hyper-V is TLB flushing. The TLB helps to protect memory and improve CPU hardware memory access performance by caching Virtual Address to Physical Address translations. Here is a nice deck on the Intel site with some slides on Guest Virtual Memory translations https://softwarecommunity.intel.com/isn/downloads/virtualization.pdf


The TLB enlightenment allows the guest OS to notify the Hyper-V hypervisor that a set of TLB entries need to be flushed rather than calling the x86 INVLPG instruction (a mov to CR3 causes a flush entire). This is really important for two reasons. The first is the TLB for the Virtual Machine is significantly larger than a real “TLB” because it helps performance and VM’s are not limited by physical die constraints like power and cooling that impact the size of real TLB’s. The second is each time the INVLPG instructions is called by the guest it will cause a Virtual Machine exit which is more expensive than a kernel context switch.


The enlightenments are accessed via Hypercalls to the hypervisor. If you want to know more about Hypercalls you can see the Beta documentation here -  https://www.microsoft.com/downloads/details.aspx?FamilyID=91e2e518-c62c-4ff2-8e50-3a37ea4100f5&DisplayLang=en


Windows Server 2008 is fully enlightened which means it takes advantage of all possible enlightenments. Other operating systems have varying degree of support.



The net on performance is to be sure you are running with Integration Components installed and are using Synthetic devices whenever available. You should also use the latest patches (like W2K3 SP2) & OS (Windows Server 2008) to take advantage of enlightenments.


[[ Since Hyper-V is not RTM'ed all numbers are subject to change as are the behaviors. ]]