If Windows Task manager shows excessive resource usage (CPU or memory, mostly) for an IIS 7 worker process (w3wp.exe), it’s helpful to identify which of your application pools consumes the resources. I haven’t found a way to accomplish this in IIS Manager so I proceeded like so:
At the command prompt:
net start WAS
Note: WAS is the Windows Process Activation Service (btw, pretty silly service name, as it’s nigh impossible to google for WAS).
Run appcmd list wp:
C:\Windows\system32>%windir%/system32/inetsrv/appcmd list wp
WP “5716″ (applicationPool:DefaultAppPool)
WP “968″ (applicationPool:MyOtherAppPool)
WP “5836″ (applicationPool:TheThirdAppPool)
The number in number in the results is the process ID in the results is the Windows process ID (PID).
Now in Windows Task Manager, after having enable the PID column in View>Select Columns… you can identify the offending w3wp.exe by its PID.
If you have an easier way to do this, please post in the comments.
June 1st, 2008 at 3:47 pm
Sure, it’s easy in IIS Manager. Just click on the ‘Worker Process’ feature in IIS Manager (you have to be clicking on a server in the left hand pane tree view). This will also show you CPU and memory usage for a given AppPool.
June 2nd, 2008 at 6:54 am
Thanks Bill, much easier indeed. I guess I was clicking the Application Pools in the left pane and couldn’t move to the worker processes from there.
November 26th, 2008 at 10:08 pm
@Bill, Nice one!
I wanted to add that when remote debugging, make sure your app pool is running by making an initial request and set “Ping Enabled” to false under the Process Model category in the app pool’s Advanced Settings.
December 31st, 2008 at 7:44 am
Hi I just want to inform that Bill’s comment does not work with my server. It show “category does not exist”
but Dirk’s command work fine.