2007/04/04

Windows Perfmon: The Top Ten Counters

One of the things I love about Windows is Performance Monitor a/k/a PerfMon. It's an amazing tool that goes far too often unused - and when it does get used, it is often misinterpreted. So today I'm going to take you on the nickel tour through PerfMon, and the ten counters most valuable to determining overall system health and activity.

To open PerfMon, just go to the Start Menu, choose Run and type perfmon.
Bottleneck analysis
The most common use of PerfMon is to answer the burning question: why is my system running slow?

With the five performance counters listed below, you can quickly get an overall impression of how healthy a system is - and where the problems are, if they exist. The idea here is to pick counters that will be at low or zero values when the system is healthy, and at high values when something is overloaded. A 'perfectly healthy' system would show all counters flatlined at zero. (Perfection is unattainable, so you'll probably never see all of these counters flatlined at zero in real life. The CPU will almost always have a few items in queue.)
  • Processor utilization
    • System\Processor Queue Length - number of threads queued and waiting for time on the CPU. Divide this by the number of CPUs in the system. If the answer is less than 10, the system is most likely running well.
  • Memory utilization
    • Memory\Pages Input/Sec - The best indicator of whether you are memory-bound, this counter shows the rate at which pages are read from disk to resolve hard page faults. In other words, the number of times the system was forced to retreive something from disk that should have been in RAM. Occasional spikes are fine, but this should generally flatline at zero.
  • Disk Utilization
    • PhysicalDisk\Current Disk Queue Length\driveletter - this is probably the single most valuable counter to watch. It shows how many read or write requests are waiting to execute to the disk. For single disks, it should idle at 2-3 or lower, with occasional spikes being okay. For RAID arrays, divide by the number of active spindles in the array; again try for 2-3 or lower. Because a shortage of RAM will tend to beat on the disk, look closely at the Memory\Pages Input/Sec counter if disk queue lengths are high.
  • Network Utilization
    • Network Interface\Output Queue Length\nic name - is the number of packets in queue waiting to be sent. If there is a sustained average of more than two packets in queue, you should be looking to resolve a network bottleneck.
    • Network Interface\Packets Received Errors\nic name - packet errors that kept the TCP/IP stack from delivering packets to higher layers. This value should stay low.
To highlight a particular counter's line on the graph, select that counter in the lower pane. Then click the lightbulb icon on the toolbar above the graph. This will make the line for that counter turn thick and white (or black on some systems - I never found out why this changes).

Pay close attention to the scale column! Perfmon attempts to automatically pick a scale that will magnify or reduce the counter enough to produce a meaningful line on the graph ... but it doesn't always get it right. As an example, Perfmon often chooses to multiply Disk Queue Length by 100. So, you might think the disk queue length is sustained at 10 (bad!) when in fact it's really at 1 (good). If you're not sure, highlight the counter in the lower pane, and watch the Last and Average values just below the graph. In the screenshot below, I modified all of the counters to a scale value of 1.0, then changed the graph's vertical axis to go from 0-10.
To change graph properties (like scale and vertical axis as discussed above), rightclick the graph and choose Properties. There are a number of things to customize here ... fiddle with it until you have a graph that looks good to you.
To get a more detailed explanation of any counter, rightclick anywhere in the perfmon graph and choose Add Counters. Select the counter and object that you are curious about, and click the Explain button.
This screenshot shows a very lightly-loaded XP system, with the Memory\Pages Input/Sec counter highlighted:





All we see here is the Proccessor Queue Length hovering between 1 and 4, and two short spikes of Pages Input/Sec. All other counters are flatlined at zero, which is easy to check by highlighting each of them and watching the values bar underneath the graph. This is a happy system - no problems here!
But if we saw any of the above counters averaging more than 2-4 for long periods of time (except Processor Queue Length: don't worry unless it's above 10 for long lengths of time), we'd be able to conclude that there was a problem with that subsystem. We could then drill down using more detailed counters to see exactly what was causing that subsystem to be overloaded. More detailed analysis is beyond the scope of this article, but if there's enough interest I could do a second article on that. Leave a comment if you're interested!
General activity counters
Well, the system is healthy - and that's good ... but how hard is it working? Is the processor workin' hard, or hardly workin'? How much RAM is in use, how many bytes are being written to or read from the disk or network? The following counters are a good overview of general activity of the system.
  • Processor utilization
    • Processor\% Processor Time\_Total - just a handy idea of how 'loaded' the CPU is at any given time. Don't confuse 100% processor utilization with a slow system though - processor queue length, mentioned above, is much better at determining this.
  • Memory utilization
    • Process\Working Set\_Total (or per specific process) - this basically shows how much memory is in the working set, or currently allocated RAM.
    • Memory\Available MBytes - amount of free RAM available to be used by new processes.
  • Disk Utilization
    • PhysicalDisk\Bytes/sec\_Total (or per process) - shows the number of bytes per second being written to or read from the disk.
  • Network Utilization
    • Network Interface\Bytes Total/Sec\nic name - Measures the number of bytes sent or received.
In the graph below, I added these five counters to my existing 'bottlenecks' graph, and changed the vertical axis to go from 0-100. I highlighted the Working Set\_Total counter, which is currently at about 123 megabytes for the system. Notice how it shows a thick line at the top of the graph - you could assume that it was pegged at 100, if you didn't read the values bar (123,052,03 divided by a million is approximately 123 megabytes).



And ... that's all for now. Hopefully this quick show-and-tell has given you enough information to use PerfMon more usefully in the future!

46 comments:

gmagerr said...

First of all, it's great to have you back. I really enjoy coming to the site. If you would be up to writing a second more detailed article on this topic, I for one would appreciate the effort. Thanks.

Kristian said...

Thanks for your time spent on writing this good piece!
Cheers from Kristian

Anonymous said...

Umm, are you okay? I keep on coming back thinking my rss reader is bad, but nope, still no updates :-(

Anonymous said...

quxxo what happen???

Anonymous said...

Good stuff. One thing this is really useful for is determining if the server can be a virtual machine. I know disk I/O will kill a VM host, but I'm not too sure on what exact numbers would constitute a good candidate for a VM.

Jimmy said...

Hi,

I'd like to also see a followup to this article. It was really good stuff. Thank you

Anonymous said...

Great article. Just like Jimmy, I'd love to see a follow up article.

Ross said...

Very helpful article, thanks a lot.

Anonymous said...

This is the best article for perfmon I've seen yet! I would be very interested in seeing the second article. When can you have it posted??? ;-)

Anonymous said...

Great article, I'd love to see a second!

Anonymous said...

This is very interesting. Would love to see more details into this..

atroon said...

Got here via your post in Ars. Thanks much for the article; I maintain a Windows network using a finicky custom program, and this is absolute gold.

Anonymous said...

This is a great article. Thanks! I too would be interested in more detail.

Anonymous said...

Introducing a new public forum for Perfmon.
http://social.technet.microsoft.com/Forums/en-US/perfmon/threads/

thanks.

Anonymous said...

Any idea why I see max values for something like (java)\% Processor Time at 159.688? Average is 35.668 with a stddev of 29.234 but anyone looking at the max will be like "whaa??"

Regards.

Anonymous said...

this is wicked man, thank you very much for your information.

james_randal said...

thank you very informative...

Scott said...

Take a look at SmartMon (www.perfmonanalysis.com) when its time to analyze the Perfmon data that has been collected.

Spring said...

I had no clue this existed thanks!

Anonymous said...

This is the best article I've read in a week of searching. Thanks!!!!

Mayuri Mehta said...

Thanks for such a great article. It is very helpful....

Anonymous said...

Thanks for the detailed info. It really helps.

Regards,
Sohail Chaudhry

Anonymous said...

It really helps..Thank you

Would like to see more articles like this...

Anonymous said...

A timeless classic.

Thank you.

Anonymous said...

Great advice - Thanks

James said...

Still valid and still useful, thanks for taking the time to write this.

James

Abdul Rahman said...

I use it every time I generate performance reports. Thank you very much for such a nice article.!!

Anonymous said...

Great Article! Very Useful....Thank you!

Anonymous said...

Brilliant, To the point and simple to understand, just how I need it. Thanks you this was very helpful to me .

SleepyBobos said...

Excellent article.

I wonder is it useful to run more than one instances of perfmon to split up counters which are a percentage and those that are a discrete number?

This might help to make it easier to visualize the two types of value and not have large discrete values (say number MBytes of HDD available) obscure percentage values due to perfmon automatically picking the scale.

Syclone0044 said...

Wow, the Current Disk Queue Length really is the most valuable counter.

For anyone who really wants their socks blown off, download the DiskLED utility and plug in Current Disk Queue Length, and get a REAL load meter for your I/O-bound system!!! Wow!

hermes victoria said...

Great blog.I think they will get their salary depends upon their strength,experience.

basma gaber said...

شركات عزل مائي

شركة مكافحة حشرات جدة

تنظيف فلل بالدمام

شركات مكافحة الحشرات فى الرياض

افضل شركة تنظيف بالخرج




here

here

here

here

here

here

here

here

here

here

here

here

here

here

here

basma gaber said...

شركة تنظيف بيارات بالدمام

شركة تنظيف منازل بالمدينة

شركة تنظيف منازل بالدمام

نقل عفش بجدة

شركه نقل اثاث بمكة

شركة نقل اثاث بالدمام

شركة تنظيف منازل بالمدينة المنورة

شركات عزل مائي

شركة مكافحة حشرات جدة

تنظيف فلل بالدمام

شركات مكافحة الحشرات فى الرياض

افضل شركة تنظيف بالخرج

basma gaber said...

شركة تنظيف منازل بالرياض

شركة نقل اثاث بالرياض

شركة كشف تسربات المياه بالدمام

شركة رش مبيدات بالدمام

شركة تنظيف خزانات بالدمام

basma gaber said...

1. شركة تنظيف فلل بالرياض

2. شركة نظافة بالرياض

3. شركة عزل خزانات

4. عزل اسطح بالرياض

5. شركة تنظيف فلل بالرياض

6. شركة تنظيف شقق بالرياض

7. شركة تنظيف موكيت بالرياض

8. شركة تنظيف بالرياض

9. شركة رش مبيدات بالرياض

10. شركة تخزين اثاث بالرياض

11. شركة تنظيف شقق بالرياض

12. شركة غسيل خزانات بالرياض

basma gaber said...

شركة عزل أسطح بالدمام

شركة عزل أسطح بالدمام

نقل عفش بالمدينة

شركة عزل أسطح بالرياض

شركة تنظيف بيوت بالرياض

اسعار نقل العفش بالرياض

شركة نقل اثاث بالمدينة المنورة

شركات تنظيف المنازل في جدة

شركة نقل اثاث بالرياض

شركة تسليك مجارى بالرياض

شركة تخزين اثاث بالرياض


basma gaber said...

شركة تخزين عفش بالرياض

شركة رش مبيدات بالرياض

شركة مكافحة حشرات بالرياض

شركة تسليك مجاري بالدمام

شركة مكافحة حشرات بالدمام

شركة تنظيف منازل بالدمام

شركة تنظيف فلل بالدمام

basma gaber said...

شركة تخزين عفش بالرياض

شركة رش مبيدات بالرياض

شركة مكافحة حشرات بالرياض

شركة تسليك مجاري بالدمام

شركة مكافحة حشرات بالدمام

شركة تنظيف منازل بالدمام





محمد الرحمه said...

شركة تنظيف بالرياض
شركة مكافحة حشرات بالرياض
شركة تنظيف منازل بالرياض
شركة نقل اثاث بالرياض
شركة تنظيف شقق بالرياض
شركة تنظيف فلل بالرياض
شركة مكافحة النمل الابيض بالرياض
شركة رش مبيدات بالرياض
شركة تخزين عفش بالرياض

محمد الرحمه said...

شركة تسليك مجارى بالرياض
شركة عزل خزانات بالرياض
شركة تنظيف واجهات حجر بالرياض
شركة تنظيف خزانات بالرياض
شركة جلى بلاط بالرياض
شركة جلى سيراميك بالرياض
شركة تنظيف خيام
شركة تخزين اثاث بالرياض
شركة نقل اثاث بالرياض
شركة نقل عفش بالرياض
شركة تنظيف خزانات بالرياض
شركة مكافحة حشرات بالرياض
شركة مكافحة البق بالرياض
شركة مكافحة حشرات بالرياض

محمد الرحمه said...

شركة تسليك مجارى بالرياض
شركة عزل خزانات بالرياض
شركة تنظيف واجهات حجر بالرياض
شركة تنظيف خزانات بالرياض
شركة جلى بلاط بالرياض
شركة جلى سيراميك بالرياض
شركة تنظيف خيام
شركة تخزين اثاث بالرياض
شركة نقل اثاث بالرياض
شركة نقل عفش بالرياض
شركة تنظيف خزانات بالرياض
شركة مكافحة حشرات بالرياض
شركة مكافحة البق بالرياض
شركة مكافحة حشرات بالرياض

محمد الرحمه said...


شركة تنظيف واجهات حجر بالرياض
شركة غسيل السجاد بالرياض
شركة تنظيف واجهات زجاج بالرياض
شركة تنظيف سيراميك بالرياض
عزل خزانات المياه من الداخل
نقل اثاث شمال الرياض
شركة نقل اثاث من الرياض الى الاردن
شركة نقل اثاث من الرياض الى جدة
شركة تنظيف بالدوادمى
ارخص شركة نقل اثاث بالرياض
شركة تنظيف ستائر بالرياض
شركة نقل اثاث شرق الرياض
شركة رش مبيدات شرق الرياض
شركة تنظيف مسابح بالرياض
شركة تنظيف مساجد بالرياض
كشف تسربات المياه
شركة نقل اثاث من الرياض الى القصيم
شركة نقل اثاث من الرياض الى جدة
شركة نقل اثاث من الرياض الى الامارات
شركة نقل اثاث من الرياض الى دبى
شركة نقل اثاث من الرياض الى المدينة المنورة
شركة نقل اثاث من الرياض الى قطر
شركة نقل اثاث من الرياض الى الكويت

محمد الرحمه said...

شركة مكافحة حشرات بالدمام
شركة رش مبيدات بالدمام
شركة مكافحة النمل الابيض بالرياض
شركة تنظيف بجدة
شركة تنظيف فلل بجدة
شركة مكافحة حشرات بجدة
شركة رش مبيدات بجدة
شركة مكافحة النمل الابيض بالرياض
شركة مكافحة النمل الابيض بالرياض
شركة مكافحة حشرات بالقطيف

محمد الرحمه said...

https://www.youtube.com/watch?v=wnNOKiVIO3w
https://www.youtube.com/watch?v=IpbCeZ-fnvU
https://www.youtube.com/watch?v=CGUj3oz5qmY
https://www.youtube.com/watch?v=ktiHAvEdWSw
https://www.youtube.com/watch?v=ktiHAvEdWSw
https://www.youtube.com/watch?v=2qRy_RNaCWU
https://www.youtube.com/watch?v=HXK4ETouvCo
https://www.youtube.com/watch?v=OB6j0d-PihA
https://www.youtube.com/watch?v=qEYTQ68K7SE
https://www.youtube.com/watch?v=c5Hwzv18rXc
https://www.youtube.com/watch?v=e4RJBPDvMWI
https://www.youtube.com/watch?v=IyfvvKPpfNQ
https://www.youtube.com/watch?v=IyfvvKPpfNQ
https://www.youtube.com/watch?v=PMGhfohId_4
https://www.youtube.com/watch?v=3FjYAUDaxVc

mossad eladawy said...

كشف تسربات المياه
شركة كشف تسربات المياه بجدة
شركة كشف تسربات المياه بالدمام
افضل شركة نقل عفش بالرياض
شركة مكافحة حشرات بالرياض
شركة رش مبيدات بالرياض
شركة مكافحة النمل الابيض بالرياض