Condividi tramite


Tips for improving the performance of Hypervisor-based virtual machine images

There are several improvements that can be made on the Hypervisor Host machine and on the virtual machines running on this host machine (guest machines). If possible the host machine should run Windows 2008 Server R2 since the latest version of Windows Server does offer significant performance improvements over Windows Server 2008

1. Settings on the host machine
(Windows Server 2008 SP2 or Windows 2008 Server R2)

- The latest hardware drivers should be installed on the host machine (Chip set, storage, network, etc.). Please check the website of the vendor for the latest updates.
- Check for updates for the hypervisor component and update if available
- Install the latest storage driver
- Install the chip set drivers
- If possible set up the storage on which the virtual machine hard disks are located as a stripe set (Raid 0). Windows should be installed on a disk which is separated from those disks on which the virtual machine disks are located
- If virtual machines are running there should be at least 1 GB Memory of available physical memory left for the operating system.

Here is an example (see picture 1)

On this machine there is 8 GB of physical RAM installed. At the moment the screenshot was taken 1.02 GB of physical RAM were allocated to various processes. This is the amount of memory consumed by Windows 2008 R2 when there are no other processes running apart from the OS processes. As more and more virtual machines are started up on a host machine the more physical memory is consumed. When an amount of approx. 7 GB is consumed by processes one will see that the performance of the host AND guest machines will become sluggish as the operating system starts to make more and more use of the page file which will drive down the performance of all processes. It might get to the point where the guest machines do not run properly anymore.

If the amount of available memory drops below 1 GB one should turn off all virtual machines which are not needed until the amount of available memory rise above 1 GB.

image 
Picture1: Memory consumption on Windows 2008 R2 OS

2. Settings on the virtual machines (guest machines)

For all Guest machines:

- Turn off the screensaver!

2.1.) Settings for Windows 2003 Server:

- Tools –> Folder Option –> View –> Advances Settings –> Uncheck the "Automatically search for network folders and printers” option

image

- Display properties –> Settings –> Advanced –> Troubleshoot –> Hardware acceleration –> Set to Full and check “Enable Write combining”

image

- Control Panel –> Power Options –> Power Schemes –> Set Power scheme to "Presentation"
- Turn off monitor –> Set to "Never"

image

- Start –> Settings –> Control Panel –> System –> Advanced System Settings –> Advanced tab –> Performance -> Visual effects –> select and check "Adjust for best performance"

- Start –> Settings –> Control Panel –> System –> Advanced System Settings –> Advanced tab –> Performance –> Processor Scheduling –> Adjust for best performance of  "Background services" (see image below)

image

2.2.) Windows Server 2008 / Windows Server 2008 R2

- Turn off the screensaver 
- Control Panel –> Power Settings –> Set power plan to "High Performance"
- Start –> Settings –> Control Panel –> System –> Advanced System Settings –> Advanced tab –> Performance -> Visual effects –> select and check "Adjust for best performance"
- Start –> Settings –> Control Panel –> System –> Advanced System Settings –> Advanced tab –> Performance –> Processor Scheduling –> Adjust for best performance of  "Background services" (same as image above)

2.3.) Windows XP

- Turn off the screensaver
- Tools –> Folder Option –> View –> Advances Settings –> Uncheck the "Automatically search for network folders and printers” option
- Display properties –> Settings –> Advanced –> Troubleshoot –> Hardware acceleration –> Set to Full and check “Enable Write combining”
- Control Panel –> Power Options –> Power Schemes –> Set Power scheme to "Presentation"
- Turn off monitor –> Set to "Never"

- Start –> Settings –> Control Panel –> System –> Advanced System Settings –> Advanced tab –> Performance -> Visual effects –> select and check "Adjust for best performance"
- Start –> Settings –> Control Panel –> System –> Advanced System Settings –> Advanced tab –> Performance –> Processor Scheduling –> Adjust for best performance of  "Background services"

- Disable the balloon tips:

Hive: HKEY_CURRENT_USER
Key: Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
Name: EnableBalloonTips
Type: REG_DWORD –> set the value to 0

2.4.) Recommendation for all Hyper-V guest machines:

Ensure that the latest Hyper-V integration services are being installed on the guest machines.

Open a Virtual machine connection to a guest machine. Go to the menu of the Virtual Machine connection window and select: Action –> Insert integration services setup disk. If the integration services on the guest machine are outdated you will get this pop-up.

image

Run the installation and reboot the guest machine in order to finalize the installation of the updated integration services. 

image

Windows Server services packs and updates do include upgrades to the integration services. These upgraded integration services result in substantial performance improvements of the guest machines. When older guest machines/virtual disks are integrated into a Windows 2008 R2 Hypervisor Host machine the update of the integration services will result in a significant performance improvement. The hyper-V integration services in Windows Server 2008 R2 have the version number 6.1.7600.16385. This can be checked in “Add or remove programs” in the control panel.

*** The following procedure will show no-longer-connected devices in Device Manager for Server 2008 ***

- Open a command window with elevated privileges (Start –> Right-click "Command Prompt", select "Run as Administrator")
- In the command window, execute the following command:

SET DEVMGR_SHOW_NONPRESENT_DEVICES=1

Start –> type DEVMGMT.MSC
Go to View –> Show hidden devices
Under Network Adapters uninstall any network cards that are no longer used.

image

Last but not least, you need to correctly configure your antivirus software on the host machine to exclude the Hyper-V processes as well as VHD / ISO / Configuration files and folders from real-time scan. These are the processes and file types you need to add to the exclusion list:

Inspectvhddialog.exe
Vmconnect.exe
Vmms.exe
Vmwp.exe

File types : *.iso, *.vhd, *.avhd

Thanks and i hope you found this article useful!

Florian Alin Noaghea
- Support engineer / Enterprise Messaging (Exchange) team

Comments

  • Anonymous
    May 25, 2010
    The comment has been removed
  • Anonymous
    January 24, 2016
    Very help full thank you