If you would like to read the other parts in this article series please go to:
- Troubleshooting Slow VM Performance in Hyper-V (Part 1)
- Troubleshooting Slow VM Performance in Hyper-V (Part 3)
- Troubleshooting Slow VM Performance in Hyper-V (Part 4)
- Troubleshooting Slow VM Performance in Hyper-V (Part 5)
- Troubleshooting Slow VM Performance in Hyper-V (Part 6)
In the previous article in this series, I explained that the first step in troubleshooting virtual machine performance problems is to establish a performance baseline. Baseline performance counter readings provide you with a basis of comparison that you can use as you take measures to try to correct the performance problems. As you make adjustments to the virtual machine configuration (or to the host server configuration) you can compare the current performance metrics against your original baseline readings. That way, you can objectively tell whether or not the adjustments that you are making are doing anything to improve the virtual machine’s performance.
Throughout this article series I am going to be spending quite a bit of time discussing performance counters and the types of things that you should be looking for as you take performance readings. I also plan to talk about what some of the various performance counter values mean as well as some things that you can do in an effort to correct the problem if you see counter values that are not in line with what you would normally expect from a healthy virtual machine.
Having said that, I will be the first to admit that troubleshooting virtual machine performance problems using performance monitoring data can be a tedious, difficult, and extremely time-consuming process. Sometimes you may not have time to work through a performance diagnosis in this way. For example, if you have a production virtual machine that is running more slowly than it should be then you may not be able to spend weeks recording performance monitoring data and making incremental adjustments. In those types of situations it might be better to attempt a quick and dirty fix first in the interest of resolving the problem quickly. That being the case, I want to spend the remainder of this article discussing some things that you can look for before you delve into any hard-core performance monitoring.
The Integration Services
The first thing that I recommend checking is to make sure that the Integration Services are installed on the virtual machine and that the virtual machine is running the correct version of the Integration Services.
For those who might not be familiar with the Integration Services, they are a collection of drivers that allows the virtual machine to communicate with Hyper-V. The Integration Services function in a similar manner to the VMware Tools. If the Integration Services are not installed on a particular virtual machine, or if the virtual machine is running an outdated version of the Integration Services then performance can suffer. Fortunately, this is an easy fix.
To check the Integration Services, open the Hyper-V Manager and then double click on the virtual machine that is experiencing performance problems. When the virtual machine’s console opens, select the Insert Integration Services Setup Disk command from the console’s Action menu, as shown in Figure A.
Figure A: Select the Insert Integration Services Setup Disk command from the virtual machine console’s Actions menu.
Shortly after inserting the Integration Services Setup Disk you should see a message indicating the status of the Integration Services. However, if the virtual machine is not configured to auto run removable media then you may have to open the virtual machine’s Computer console and double click on the virtual disk that is associated with the Integration Services. This virtual disk will be displayed as a DVD and is labeled Integration Services Setup, as shown in Figure B.
Figure B: You may have to manually double click on the integration Services Setup disk.
Once the Integration Services setup disk has been launched, you should see a window that reflects the status of the Integration Services. For example, if you look at Figure C, you can see that this particular virtual machine is running an older version of the Integration Services. Windows goes on to indicate that the Integration Services can be upgraded simply by clicking OK. It is worth noting that after you install or upgrade that Integration Services, you will need to reboot the virtual machine.
Figure C: The Integration Services can be upgraded by clicking OK.
Normally this procedure will correct any problems that you might be experiencing with the Integration Services. However, even if the correct version of the Integration Services is installed, there is always the possibility that one of the Integration Services components may be disabled. You can use the Hyper-V Manager to check for this condition.
To do so, right click on the listing for the virtual machine within the Hyper-V Manager, and choose the Settings command from the shortcut menu. When you do, you will see the virtual machine settings. Scroll to the bottom of the settings page and click on the Integration Services option. As you can see in Figure D, the various Integration Services can be enabled or disabled individually. Under normal circumstances all of the Integration Services should be enabled. However, there are some exceptions. The Integration Services are not compatible with some older versions of Windows. Likewise, the Integration Services cannot be used with non-Windows operating systems.
Figure D: Make sure that all of the Integration Services are enabled.
A similar issue that can also impact virtual machine performance is the use of emulated hardware. Emulated hardware performs much more slowly than true virtualized hardware. That being the case, you should avoid the use of emulated hardware unless you are running an operating system that requires it.
I recommend beginning your check for emulated hardware by finding out if the virtual processor is running in compatibility mode. Compatibility mode is used for supporting extremely old operating systems such as Windows NT. It is also used in situations where processor compatibility issues prohibit P2V conversions.
To check whether or not the virtual processor is operating in compatibility mode, open the Hyper-V Manager, right click on the virtual machine, and choose the Settings command from the shortcut menu. When the Settings screen appears, expanded the Processor container and then click on the Compatibility container. As you can see in Figure E, there is a check box that can be used to enable processor compatibility mode. This check box should be deselected unless you have a compelling reason to use it. It is also worth noting that this option will be grayed out unless the virtual machine is shut down.
Figure E: Check to make sure that the virtual processor is not operating in compatibility mode.
Similarly, it is a good idea to make sure that your virtual machine is not using an emulated network adapter. If you click on the Add Hardware container, you will see an option for a Legacy Network Adapter. If you create a virtual network adapter in this way, Hyper-V will create an emulated network adapter. This is useful for operating systems that do not support the Integration Services, but should otherwise be avoided. The Settings page’s Network Adapter container will tell you if a legacy network adapter is present.
In this article, I have shown you a few quick things that you can check that can have a dramatic impact on virtual machine performance. In the next part of this article series, I want to continue the discussion by showing you how you can use the Task Manager inside of a virtual machine as a tool for figuring out the root cause of a performance problem without delving into the Performance Monitor.
If you would like to read the other parts in this article series please go to: