When you’re using Hyper-V as a virtualization platform this Hyper-V environment will be a very critical component for your IT infrastructure. I don’t need to tell anyone that you need to watch these critical components very closely. In this multipart blog I will show you how you can watch your Hyper-V environment using several different products. In this part we will take a look at HyperV_Mon and the PAL tool.
Let’s start with a basic tool. HyperV_Mon is a freeware tool for viewing CPU performance of a Hyper-V server, it’s not a regular monitoring tool. The tool can help you to understand true CPU usage of a virtual machine. This tool can be downloaded from here. Just unpack the ZIP file and double click HyperV_Mon.exe (you don’t need to install any software). This tool only requires that you have the .NET 3.5 Framework installed on the machine where you run the tool. You also need WMI access to the Root Partition of the host which you want to monitor. You can run to tool from a remote machine so it’s not necessary to run the tool on the Hyper-V host itself. This makes it possible to monitor a Hyper-V core edition host.
The tool is very easy to configure:
After adding the host to the tool you get insight information about CPU, Memory and disk I/O. You will get this information of the host (root partition) and the virtual machines running on that host (child partition).
The task manager inside the guest OS machines does not provide you with the right information. This isn’t the task manager’s fault. Microsoft refers to this as clock skew. The problem has to do with the fact this counter set uses the clock from the root rather than from the hypervisor as a basis of time. This is why this tool must pull information out of the hypervisor to know what is really going on.
In the last version of this tool memory related information has been added, both for the root partition and the VMs. This information is focused on three key values to help you decide if you have too much or too little memory installed in the VM. Be aware that memory allocated to running VMs are also shown as consumed memory in the host partition OS. You can also see the VMs paging activity. A lot of paging activity means that you need to add memory.
Again this is not a regular monitoring tool. It can’t send alerts, It can’t compose reports and monitoring CPU, memory and disk I/O is not enough.
So we need more than this tool. Let’s have a look at the Performance Analysis of Logs (PAL) tool.
Performance Analysis of Logs (PAL) Tool
PAL is not a tool like HyperV_MON. PAL is a handy tool which can be used in combination with the build-in Performance Monitor of Windows Server 2008 R2. PAL gives you predefined performance counters which you can use in performance monitor. PAL will give you much more information than HyperV_MON.
As I said, PAL is not the tool that will do the monitor job itself. The build-in Performance monitor of Windows Server 2008 R2 will do the monitoring. First of all PAL give us a set of predefined performance counters which we can use in Performance Monitor as a Performance Capture template. This template can be used to monitor for a certain time. After that time we can move/ copy the generated logs file to the workstation or server where PAL runs and analyze these logs files with PAL. PAL will show us the recorded performance monitors, compare these values with normal values and tell you if your environment performs well or not. Let’s have a look at this tool:
The installation of PAL is very straightforward but after the installation we need to do some configuration before we can start collection performance statistics. After the installation we start the PAL wizard and browse to the tab ‘Questions’. We provide the necessary information in this tab and then we go to the tab ‘Treshold file’. We open the ‘treshold file title’ menu and choose the’ Win2008R2 SP1 Hyper-V’ set. After selecting this we chose the option ‘Export to Perfmon Template File’. Save the file on a location that is accessible from the Hyper-V server.
Then we will switch to the Hyper-V host and open the Performance Monitor. Within Perfmon we will create a new data collector set based on the export we’ve just done:
Walk through the rest of the wizard and finish this. After running this wizard we can start collecting data by simply clicking ‘Start the data collector set’:
It’s also possible to edit the ‘default’ counter set. Right click on the performance counter and go to the properties. On the tab ‘Performance Counters’ you can remove or ad counters. As soon as we start the job there will be a file created which we’re gone use in PAL:
When you will create a realistic performance view of your environment you need to schedule this job for a couple of days or weeks. For now we just run the task for a couple of minutes. After stopping the job we copy the file to the PAL station and open the PAL wizard again. Now we go to the tab ‘Counter Log’ and specify the path to the *.blg file we’ve just copied. Now we will run through the rest of the wizard till we are arrived at the tab ‘Execute’. Here we can click ‘finish’ and the report with the performance information will be generated (oh, you need to set your locale settings of the PAL station to English-US, otherwise the report will not be generated!).
The wizard will generate a huge report. Although the report is huge it’s very easy to navigate trough the report. For each counter the report shows if this counter is OK or not. When a counter is not ok you see the amount of alerts for this counter and you can click on a hyperlink representing the counter. The hyperlink bring us to more detailed information. Here’s an example from the report:
The report shows me the value of the monitored counter in a detailed graph and tells me what a normal value is (in the description). It also provide me with a link (Microsoft TechNet page) where I can find more information about this counters and the values of this counter.
There are several points of PAL which I like very much:
- PAL provide us with a predefined set of performance counters which are important to watch and can be used in PerfMon;
- PAL provide a very detailed report about the data that is gathered and shows us the alerts;
- PAL shows us the normal values of the monitored counter and the abnormal values of a counter.
Although PAL provide us with great performance information it’s still not a complete monitoring solution. PAL only can help us with performance related problems and not with problems in applications or services like Hyper-V. So we need something what can do end-to-end monitoring of applications/ services and also give us details and information about the performance of the application or service.
In the next part of this article we will take a loot at SystemCenter Operations Manager. We will see if System Center Operations Manager can provide us with the necessary information and if this product will fulfil all our requirements.