Tuesday 25 September 2012

How to capture Memory Dumps of slow performing Url requests using Debug Diagnostic 1.2.



You may come across scenarios when end users report intermittent performance degradation of your web application or web site but you have been unable to identify the cause.

One technique of capturing performance issues is to use the Microsoft trouble shooting tool






Action Plan

1. If you haven’t already, please download and install DebugDiag 1.2 onto the target web server:


http://www.microsoft.com/en-us/download/details.aspx?id=26798
2. Open up DebugDiag from the start menu.
3. When it launches the new rule wizard should automatically start, if it doesn’t then click the Add Rule button on the Rules tab.
4. In the Select Rule Type page select the second radio button named Performance and click Next.







5. Select Http Response Times and click next.



6. Now click the Add Url button. This opens the Properties of URL to monitor dialog box. Leave the top radio button selected, to use ETW, then in the Partial URL segment to match text box type in "/MyVirtualDirectory/" without quotes, then change the timeout after value to 20 seconds as shown in the screenshot below, then click OK.

7.





8. Back on the Select URLs to monitor wizard page click Next to continue.
9. Click the Add Dump Target button. Change the Target Type dropdown menu to Web Application Pool, then select the application pool that hosts your Web application\Web site, then click OK.






 



10. Click the Add Dump Target button again. Change the Target Type dropdown menu to Web Application Pool, then select your application pool which hosts your front end ASPX pages. We want to dump both the client and the web service processes when there is a delay so we’ve added two dump targets to this rule. Simply click Next to continue.


11. Change the generate a UserDump every value to 5 seconds, change the stop after generating value from 10 to 6 user dumps, then in the bottom section of the "Configure UserDump Series" wizard page, please select the radio button to "Collect Full UserDumps", like in the screenshot below. Then click Next.



 



12. Note, and change as needed, the location of where the Userdump files will get written to when the triggers fire and dumps are collected. Then click next.


13. Leave the Activate the rule now radio button selected and click Finish.

 

At this stage DebugDiag is attached to the application pool hosting your web application\web site. Any time one of those requests execute longer than 20 seconds then DebugDiag will generate full user dumps of that app pool, wait 5 seconds and dump the same two processes again.

When we have those dumps collected, then we can verify that the app pool still shows the ASPX request waiting and then we should be able to figure out what is causing the delay in the request.





 

No comments:

Post a Comment