Microsoft ASP.NET

Version 2

    This template assesses the status and overall performance of Microsoft ASP.NET using Windows Service and Performance Counters monitors.

     

    Prerequisites: WMI access to the target server.

    Credentials: Windows Administrator on the target server.

    Monitored Components

    Note: You need to set thresholds for counters according to your environment. It is recommended to monitor counters for some period of time to understand potential value ranges and then set the thresholds accordingly. For more information, see http://knowledgebase.solarwinds.com/kb/questions/2415.

     

    Service: ASP.NET State Service

    This counter monitors ASP.NET State service which provides support for out-of-process session states for ASP.NET.

    Note: By default, this component is disabled. If you use this service in your environment you should enable it.


    Application Restarts

    This counter returns the number of times that an application has been restarted during the Web server's lifetime. Application restarts are incremented each time an Application_OnEnd event is raised. An application restart can occur because of changes to the Web.config file, changes to assemblies stored in the application's Bin directory, or when an application must be recompiled due to numerous changes in ASP.NET Web pages. Unexpected increases in this counter can mean that problems are causing your Web application to recycle. In such circumstances you should investigate as soon as possible. This value is reset to zero every time the Internet Information Services (IIS) host is restarted.

    This monitor should be zero all the time. In a perfect world, the application domain will survive for the life of the process. Excessive values should be investigated, and a new threshold should be set as necessary.

    Note: This counter has the Count statistic as difference option enabled and will show the statistical difference from the last APM polling cycle.


    Applications Running

    This counter returns the number of applications running concurrently on the server computer.


    Requests Disconnected

    This counter returns the number of requests that have been disconnected due to a communication failure.

    Note: This counter has the Count statistic as difference option enabled and will show the statistical difference from the last polling cycle.


    Requests Queued

    This counter returns the number of requests waiting for service from the queue. When this number starts to increment linearly with increased client load, the Web server computer has reached the limit of concurrent requests that it can process. The default maximum for this counter is 5,000. You can change this setting in the Machine.config file. When this limit is exceeded, requests will be rejected with a 503 status code and the message "Server is too busy."


    Requests Rejected

    This counter returns the total number of requests not executed because of insufficient server resources to process them. This counter represents the number of requests that return a 503 HTTP status code, indicating that the server is too busy. Requests are rejected when one of the queue limits is exceeded (see description of Requests Queued). Requests can be rejected for a number of reasons. Backend latency, such as that caused by a slow SQL server, is often preceded by a sudden increase in the number of pipeline instances and a decrease in CPU utilization and Requests/sec. A server may be overwhelmed during times of heavy load due to processor or memory constraints that ultimately result in the rejection of requests.

    This monitor should be zero all the time. Values greater than this should be investigated. Note: This counter has the Count statistic as difference option enabled and will show the statistical difference from the last polling cycle.


    Request Wait Time

    This counter returns the number of milliseconds that the most recent request spent waiting in the queue, or named pipe, that exists between inetinfo and aspnet_wp (see description of Requests Queued). This does not include any time spent waiting in the application queues. Returned values should be less than 1,000. The average request should spend 0 milliseconds waiting in the queue.


    State Server Sessions Abandoned

    This counter returns the number of user sessions that have been explicitly abandoned. These are sessions that are ended by specific user actions, such as closing the browser or navigating to another site. This counter is available only on the computer where ASP.NET State Service is running or it will return zero.


    State Server Sessions Active

    This counter returns the number of currently active user sessions. This counter is available only on the computer where ASP.NET State Service is running or it will return zero.


    State Server Sessions Timed Out

    This counter returns the number of user sessions that have become inactive through user inaction. This counter is available only on the computer where ASP.NET State Service is running or it will return zero.


    Worker Process Restarts

    This counter returns the number of times a worker process has been restarted on the server computer. A worker process can be restarted if it fails unexpectedly or when it is intentionally recycled. If this counter increases unexpectedly, you should investigate as soon as possible. This monitor should be zero all the time. Process restarts are expensive and undesirable. Values are dependent upon the process model configuration settings, as well as unforeseen access violations, memory leaks, and deadlocks. If aspnet_wp restarts, an Application Event Log entry will indicate why. Requests will be lost if an access violation or deadlock occurs. If process model settings are used to preemptively recycle the process, it will be necessary to set an appropriate threshold.

    Note: This counter has the Count statistic as difference option enabled and will show the statistical difference from the last polling cycle.


    Worker Processes Running

    This counter returns the current number of aspnet_wp worker processes. For a short period of time, a new worker process and the worker process that is being replaced may coexist. Although rare, sometimes processes deadlock while they are exiting. If you suspect this, consider using a tool to monitor the number of instances of the worker process. Alternatively, the Memory\Available Mbytes performance counter can be used, since these hanging processes will consume memory.

    Returned values should be less than 2. During shutdown of the previous worker process, there may be two instances. If webGarden is enabled, the threshold should be #CPUs plus 1. Values greater than this may indicate excessive process restarts within a very short period of time.


    Requests Current

    This counter returns the number of requests currently handled by the ASP.NET ISAPI. This includes those that are queued, executing, or waiting to be written to the client.

     

    ASP.NET will begin to reject requests when this counter exceeds the requestQueueLimit defined in the processModel configuration section. For classic ASP applications, Requests Queued provides a warning for when requests will be rejected. For ASP.NET, Requests Current, together with Requests in Application Queue, provide this functionality. This counter is also used by the ASP.NET deadlock detection mechanism. If Requests Current is greater than 0 and no responses have been received from the worker process for a duration greater than the limit specified by <processModel responseDeadlockInterval=/>, the process is terminated and a new process is started. In the pre-SP3 the algorithm was modified so that Requests Current must be greater than the sum of maxWorkerThreads plus maxIoThreads, specified in the <processModel/> configuration section. Note that by default the request execution timeout is 90 seconds, and is intentionally less than responseDeadlockInterval. The request execution timeout can be modified through the <httpRuntime executionTimeout=/> configuration setting or the Server.ScriptTimeout property, but it should always be made less than responseDeadlockInterval.


    Cache Total Hit Ratio

    This counter returns the ratio of hits to misses for the cache. This counter includes both use of the cache by the ASP.NET page framework NET and use of the application cache through cache APIs.


    Cache API Hit Ratio

    This counter returns the cache hit-to-miss ratio when accessed through the external cache APIs. This counter does not track use of the cache by the ASP.NET page framework.


    Compilations Total

    This counter returns the total number of compilations that have taken place during the lifetime of the current Web server process. Compilation occurs when a file with an .aspx, .asmx, .ascx, or .ashx file name extension, or a code-behind source file, is dynamically compiled on the server. This number will initially climb to a peak value as requests are made to all parts of an application. Once compilation occurs, however, the resulting compiled output is saved to disk, where it is reused until its source file changes. This means that even in the event of a process restart the counter can remain at zero (inactive) until the application is modified or redeployed. By default, batch compilation is enabled, however, this counter will increment once for each file that is parsed and compiled into an assembly, regardless of how many assemblies are created. If compilation fails, the counter will not be incremented.


    Errors Total/Sec

    This counter returns the total number of errors that occur during the execution of HTTP requests, including any parser, compilation, or run-time errors. This counter is the sum of the Errors During Compilation, Errors During Preprocessing, and Errors During Execution counters. A well-functioning Web server should not generate errors. If errors occur in your ASP.NET Web application, they may skew any throughput results because of very different code paths for error recovery. Investigate and fix any bugs in your application before performance testing. This monitor should be zero all the time.


    Output Cache Hit Ratio

    This counter returns the percentage of total requests serviced from the output cache.


    Pipeline Instance Count

    This counter returns the number of active request pipeline instances for the specified ASP.NET application. Since only one execution thread can run within a pipeline instance, this number gives the maximum number of concurrent requests that are being processed for a given application. In most circumstances it is better for this number to be low when under load, which signifies that the CPU is well utilized.


    Requests Executing

    This counter returns the number of requests currently executing. This counter is incremented when the HttpRuntime begins to process the request and is decremented after the HttpRuntime finishes the request. In v1.1 of the Framework, there is a bug in this performance counter that is fixed in the ASP.NET 1.1 June 2003 Hotfix Rollup Package. Unfortunately the bug is not described in the Knowledge Base Article. Prior to the fix, the counter included the time taken to write the response to the client.


    Requests Failed

    This counter returns the total number of failed requests. Any status codes greater than or equal to 400 will increment this counter. This monitor should be zero all the time. Note: This counter has the Count statistic as difference option enabled and will show the statistical difference from the last polling cycle.


    Requests/Sec

    This counter returns the number of requests executed per second. This represents the current throughput of the application. Under constant load, this number should remain within a certain range, barring other server work (such as garbage collection, cache cleanup thread, external server tools, and so on).


    Sessions Active

    This counter returns the number of sessions currently active. This counter is supported only with in-memory session state.


    Sessions Abandoned

    This counter returns the number of sessions that have been explicitly abandoned. This counter is supported only with in-memory session state.


    Sessions Timed Out

    This counter returns the number of sessions that timed out. This counter is supported only with in-memory session state.


    Transactions/Sec

    This counter returns the number of COM+ transactions started per second for all active ASP.NET applications.

     

    Portions of this document were originally created by and are excerpted from the following sources:

    Microsoft TechNet, “TechNet Library,” Copyright © 2012 Microsoft Corporation. 
    All rights reserved. Available at
    http://technet.microsoft.com/en-us/library/9tyc2s04(v=VS.80).aspx.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     




    Portions of this document were originally created by and are excerpted from the following sources:

    Microsoft TechNet, “TechNet Library,” Copyright © 2012 Microsoft Corporation. 
    All rights reserved. Available at
    http://technet.microsoft.com/en-us/library/9tyc2s04(v=VS.80).aspx.