How to identify which websites are using up the CPU

posted on 9 June 2008 | posted in IIS

One of the biggest headaches with IIS is trying to identify which websites are the most expensive CPU-usage wise. You can do performance monitoring but all you get is each worker process (for each application pool) identified as "w3wp.exe". Hardly helpful.

Well, there IS a way to identify each worker process. Here's how:-

Step 1: Add the PID (Process Identifier) Column in Task Manager

First, open up Windows Task Manager on your server. Next click on the Processes tab (if it isn't already selected). Now click on View, and then Select Columns. Make sure the PID (Process Identifer) column is checked. Click OK.

This enables us to uniquely identify each worker process. But how do you match that PID value to a website?

Step 2 : run iisapp.vbs

Go to Start > Run, and enter "cmd" (to open the Windows command line). Now enter "iisapp.vbs". This runs a program that matches all PID values to application pools. Providing you've given each of your websites its own application pool (see our article here), you will be able to match each worker process in the task manager to a website.

Now that you can do that, you can at least monitor which website(s) are causing process bottlenecks (i.e. CPU usage at 100% much of the time).

recommend a friendRecommend this blog entry to a friend