Ever collect performance data and determined that the w3wp.exe process was the one consuming the most CPU and wanted to figure out which Application Pool was associated to this w3wp.exe instance but couldn’t figure out how? Or do you ever wonder how do you determine which w3wp.exe process is which live on the server? Well after this blog post, you should be able to determine this rather quickly.
How to determine which Application Pool is which w3wp.exe process from Performance Data
A lot of the time when you are looking at performance data, you are seeing the process w3wp.exe is the one that is causing the problem, however, you don’t know which application pool is causing the issue from the data that was collect. Well, as long as you collect at least “\Process(*)\ID Process” and “\W3SVC_W3WP(*)\*” counters, you will be able to determine it rather quickly by following these steps.
- Know which w3wp.exe process you want to be looking at (w3wp, w3wp#1,w3wp#2…)
- Load up the counter “\Process(the process you want to look at)\ID Process”
- Check to make sure the PID doesn’t change. If it does, then we need to zoom into the area where we were having an issue
- The load up the counters “\W3SVC_W3WP(*)\Active Requests”
- It doesn’t need to be Active Requests, but any counter under here will work as it is the instances that we are looking at.
- Then find the number in front of the App Pool that matches the “\Process(the process you want to look at)\ID Process”
Now you can see that we are having an issue with MSExchangeServicesAppPool and are able to continue to troubleshoot down the path of why that service may be having issues. (I do apologize about the image not being the best for this one, I don’t think I have the original data to try and get an updated version.)
You can also use this method in reverse in order to see what a particular App Pool is doing for CPU usage during an issue as well. Either way you want to use it, it makes it so much easier to review performance data that was collected without having to collect PIDs from the server to line them up, as you may run into issues like the PID changing on you because the service is having that much of an issue it crashed or was restarted.
How to determine which Application Pool is which w3wp.exe process from on the server
Typically, most admins determine that they are running into a CPU issue by just logging onto the server and noticing that their CPU usage is extremely higher than normal. The same problem can occur here with trying to which w3wp.exe process is consuming the most CPU usage, as by default the detailed information in task manager doesn’t provide which w3wp.exe process lines up with which Application Pool. So, in order to have a better understanding quickly as to which Application Pool is taking up the most CPU, you can follow these steps to determine this.
- Open Task Manager, if you don’t have it open already
- Go to View then Select Columns…
- Select the option “Command Line”
- Go to the w3wp.exe process that you are wanting to determine what Application Pool it belongs to, then look at the data provided in the column “Command Line”
From this information, you should be able to determine which w3wp.exe process is running which Application and can continue troubleshooting from there.