Tuesday, November 27, 2007

Two Perfmon tips

Here are two tips for using Perfmon in Windows



Perfmon Tip #1 (Basic): Identify a counter associated with a specific line in a busy graph.



When a perfmon graph is opened with many counters added, it can be quite difficult to match up the counters with the lines on the graph. There are two methods to deal with this, outside of reducing the number of counters displayed - the obvious one, which is to use the highlight button (CTRL+H) to highlight a counter in the list, then scroll up and down and select the counter by name. The other option is to double-click (carefully) on the lines in the graph, and it will highlight that line and jump to the associated counter. This comes in handy when one of the lines stands out and you want to investigate it, like the red line in the image below.





Perfmon Tip #2 (Advanced): Pulling summary data (Ave, Min, Max) from perfmon log files for an initial review.


Once you have a captured Perfmon log file, the next question is how to analyze it. This can be a cumbersome and time consuming process, especially if there are a large number of counters in the log and if it is very large. One way to start the analysis at a high level is to review the min, max and average values of all of the counters stored in the log. To do this, open the log in Perfmon (in the System Monitor view), view as a Report, and then right click on the graph or report on the right, select Properties, click the General tab and under Report and Histogram data choose Minimum, Average or Maximum and click OK. The report view will now show, for example, the maximum of all counters. Now, right click the report and Save As.. and choose type Report (*.tsv). Repeat this for the other Average and Minimum. I usually save the reports as something like this:


Perflog1_Min.tsv
Perflog1_Ave.tsv
Perlog1_Max.tsv


Now, these TSV files can simply be opened and pasted into Excel, where they will import fairly well into rows of counters and columns of instances. I usually create three tabs in an Excel spreadsheet for each set, Min, Ave and Max. You can do a multi-page select and then adjust the column sizes and formatting for all of the sheets at once. This is a very convenient method to sort out counters that need further investigation. For example, if % Idle Time on disk C: has an average of 10%, then that would need investigation. Likewise, if Disk Queue length on D: has a maximum of 10, this needs a closer look too. This is good for a quick overall review of the performance logs.

If you're interested in a more advanced automated tool, check out the Performance Analysis of Logs (PAL) Tool here:


http://www.codeplex.com/PAL

No comments: