Microsoft KB Archive/919791

= How to use the Debug Diagnostics Tool to troubleshoot high CPU usage by a process in IIS =

Article ID: 919791

Article Last Modified on 9/15/2006

-

APPLIES TO


 * Microsoft Internet Information Services 6.0
 * Microsoft Internet Information Services 5.1
 * Microsoft Internet Information Services 5.0

-





SUMMARY
This article describes how to use the Debug Diagnostics Tool to troubleshoot high CPU usage by a process in Microsoft Internet Information Services (IIS).



INTRODUCTION
High CPU usage by a process in IIS occurs when an IIS process uses 80 percent or more of the available CPU cycles for a constant time interval. Examples of an IIS process are Inetinfo.exe, Dllhost.exe, and W3wp.exe. When high CPU usage by an IIS process occurs, you experience one or more of the following symptoms:
 * A Web page does not load correctly. For example, the Web page is blank or does not respond.
 * You experience slow performance on a server that is running IIS. For example, the progress indicator moves very slowly when you try to view a Web page.

This article discusses how to install and then configure the Debug Diagnostics Tool to troubleshoot high CPU usage by an IIS process.



MORE INFORMATION
If an IIS process uses a high percentage of available CPU cycles, we recommend that you create a full memory dump file of the IIS process when IIS processes client requests. You can use the Debug Diagnostics Tool to capture and to analyze memory dump files when IIS processes client requests.

Note The Debug Diagnostics Tool 1.0 is included with the IIS Diagnostics Toolkit.

Step 1: Download and then install the Debug Diagnostics Tool
To download and then install the Debug Diagnostics Tool, visit the following Microsoft Web site:

http://www.iis.net/handlers/895/ItemPermaLink.ashx

Step 2: Configure Performance Monitor logging
To configure Performance Monitor logging, follow these steps:  Click Start, click Run, type the path of the Debug Diagnostics Tool, and then click OK.

Note By default, the Debug Diagnostics Tool is located in the following folder:

C:\Program Files\IIS Resources\DebugDiag

 On the Tools menu, click Options and Settings. On the Performance Logging tab, click Enable Performance Counter Data Logging, and then click OK.

Note The value in the Data Sampling Interval box depends on when the high CPU usage issue occurs. The size of the log grows as the data is gathered. Contact a Microsoft Support Professional for information about how to configure the value in the Data Sampling Interval box.

Step 3: Disable Debug Exception Catching
Note If you are configuring the Debug Diagnostics Tool to use the tool with IIS 6.0, go to &quot;Step 4: Create a dump file.&quot;

If you are configuring the Debug Diagnostics Tool to use the tool with IIS 5.1 or with IIS 5.0, disable Debug Exception Catching. To do this, follow these steps:
 * 1) Click Start, click Run, type Inetmgr.exe, and then click OK.
 * 2) Right-click the computer that you want to configure, and then click Properties.
 * 3) In the Master Properties list, click WWW Service, and then click Edit.
 * 4) On the Home Directory tab, click Configuration.
 * 5) On the Process Options tab, click to clear the Enable debug exception catching check box, and then click OK.

Step 4: Create a dump file
To create a dump file, use one of the following methods.

Method 1: Create a hang rule
To create a hang rule, follow these steps:  Click Start, click Run, type the path of the Debug Diagnostics Tool, and then click OK.

Note By default, the Debug Diagnostics Tool is located in the following folder:

C:\Program Files\IIS Resources\DebugDiag

 On the Rules tab, click Add Rule.</li> Click IIS Hang, and then click Next.</li> Click Add URL, type the URL of the Web site in which you experience the issue, and then click OK. Then, click Yes to test the URL.</li> Click OK, and then click Next.</li> Click Add Dump Target.</li> In the Target Type list, click the target type that you want, click OK, and then click Next.</li> Type a name for the rule, type a path for the user dump file location, and then click Next.</li> Click Activate the rule now, and then click Finish.

On the Rules tab, notice that the rule is Active in the Status column.</li></ol>

Method 2: Create an IIS Hang Dump file manually
To create an IIS Hang Dump file manually, follow these steps:  Click Start, click Run, type the path of the Debug Diagnostics Tool, and then click OK.

Note By default, the Debug Diagnostics Tool is located in the following folder:

C:\Program Files\IIS Resources\DebugDiag

</li> On the Tools menu, click Create IIS Hang Dump.</li></ol>

Method 3: Create a user dump file for a process in the Debug Diagnostics Tool
To create a user dump file for a process, follow these steps:  Click Start, click Run, type the path of the Debug Diagnostics Tool, and then click OK.

Note By default, the Debug Diagnostics Tool is located in the following folder:

C:\Program Files\IIS Resources\DebugDiag

</li> On the Processes tab, right-click the process that you want to troubleshoot, and then click Create Full Userdump.</li></ol>

Step 5: Disable Performance Monitor logging
Approximately two minutes after the user dump file capture process is finished, disable Performance Monitor logging. To do this, follow these steps:  Click Start, click Run, type the path of the Debug Diagnostics Tool, and then click OK.

Note By default, the Debug Diagnostics Tool is located in the following folder:

C:\Program Files\IIS Resources\DebugDiag

</li> On the Tools menu, click Options and Settings.</li> <li>On the Performance Logging tab, click Disable Performance Counter Data Logging.</li></ol>

Step 6: Analyze the dump file
To analyze the dump file, follow these steps: <ol> <li>Click Start, click Run, type the path of the Debug Diagnostics Tool, and then click OK.

Note By default, the Debug Diagnostics Tool is located in the following folder:

C:\Program Files\IIS Resources\DebugDiag

</li> <li>On the Advanced Analysis tab, click Add Data Files.</li> <li>Locate and then click the dump file that you want to analyze. Click Open.</li> <li>On the Advanced Analysis tab, click Crash/Hang Analysis, and then click Start Analysis.</li> <li>Review the report that is displayed in Microsoft Internet Explorer. A copy of this report is also stored in the following folder:

C:\Program Files\IIS Resources\DebugDiag\Reports

</li></ol>

Note If you want to troubleshoot a custom .dll file, include the custom .pdb files. To include the custom .pdb files, click Tools, click Options and Settings, click Folder and Search Paths, type the path in the Symbol Search Path for Debugging box, and then click OK.

<div class="references_section">