Exam 70-553 - Optimize and troubleshoot a Web application.

Section 2

  • Part 4
    • Topic 3

Optimize and troubleshoot a Web application.

  • Customize event-level analysis by using the ASP.NET health-monitoring API.
  • Use performance counters to track the execution of an application.
  • Troubleshoot a Web application by using ASP.NET tracing.
  • Optimize performance by using the ASP.NET Cache object.

Summary

The health monitoring API is new to .Net 2.0 and is described in this excerpt from msdn

ASP.NET health monitoring allows system administrators to monitor the status of deployed Web applications. It supports the following general scenarios:

Monitoring the performance of an application to ensure that it is healthy.

Rapidly diagnosing failing applications or systems.

Appraising significant events during the lifecycle of a given application.

The health monitoring system includes the event types responsible for packaging application health status information, the provider types responsible for processing this information, and the supporting types that help during the management of health events .

When tracking performance in an ASP.Net application you should look at the following counters as taken from msdn:

ASP.NET - Application Restarts
ASP.NET - Requests Queued
ASP.NET - Worker Process Restarts
ASP.NET - Applications Errors Total
ASP.NET - Applications Requests/Sec
Processor - % CPU Utilization

The % CPU Utilization counter monitors CPU utilization on the Web server computer. Low CPU utilization or the inability to maximize CPU utilization regardless of client load can signify contention for a lock or a resource in your Web application.

In addition, the following performance counters can be valuable in determining problems with your Web applications' performance.

ASP.NET - Applications Pipeline Instance Count
.NET CLR Exceptions - # of Exceps Thrown
System Context - Switches/sec

Tracing hasn’t changed much from ASP.Net 1.1. The config now has a mostrecent attribute so that trace.axd will always have the most recent request traced. If you are not familiar with tracing please review the link in the resources.

Caching is one of the easy ways to improve performance and scalability. ASP.Net provides various ways to support caching including: Page Level Caching (when the entire page is cached for a duration), User Control Level Caching or Fragment Caching (When a user control is cached, possibly varied by param) and through a Cache API that works similarly to Session and Application objects for reading and writing data.

Caching can even be applied to DataSource Objects. Simply set EnableCaching to true and specify a Cache Duration.

Other Resources & Links:

ASP.Net Health Monitoring
http://msdn2.microsoft.com/en-us/library/ms178701.aspx

Performance Counters for ASP.Net
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconPerformanceCountersForASPNET.asp

ASP.Net Tracing
http://msdn2.microsoft.com/en-us/library/y13fw6we.aspx

ASP.NET Caching: Techniques and Best Practices
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-cachingtechniquesbestpract.asp

Improved Caching in ASP.Net 2.0
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/CachingNT2.asp

Exam 70-553 - Implement a consistent page design by using master pages.

Exam 70-553 - Copy a Web application using the Copy Web tool, and Precompile a Web application using the Publish Web tool.