Performance counters for ASP.net __.net

Source: Internet
Author: User
Tags anonymous garbage collection microsoft sql server sessions switches cpu usage high cpu usage

ASP.net supports two sets of performance counters: systems and applications. The former is exposed in PerfMon in the asp.net performance counter object, which is exposed in the asp.net applications performance object. The state server Sessions counter in the asp.net performance object (applicable only to the server computer in which the status server is running) and asp.net applications There are significant differences between the Sessions counters in the performance object that apply only to user sessions that occur in a process.

Note that the values associated with each performance counter are updated once every 400 milliseconds.

When monitoring the performance of ASP.net Web applications, you should always keep track of the performance counters listed in the following table.

performance Objects Performance Counters
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

% CPU Utilization counters monitor CPU usage on the WEB server computer. The low CPU usage or inability to achieve maximum CPU usage, regardless of the client load, means that there is a resource or lock-in competition in the Web application.

In addition, the performance counters listed in the following table are useful when determining WEB application performance issues.

performance Objects Performance Counters
asp.net applications Pipeline Instance Count
. NET CLR Exceptions # of Exceps Thrown
System Context Switches/sec

# of Exceps thrown counters display the number of exceptions thrown in the application because they can adversely affect performance. However, some code paths must rely on exceptions to work properly. For example, theHttpResponse.Redirect method always throws an exception ThreadAbortExceptionthat cannot be caught. Therefore, it is more useful to track the number of exceptions thrown by using the Errors Total counter to see whether an exception generates an error on the application.

The context switches/sec counter measures the rate at which all CPU switch thread contexts are in the WEB server computer. If the value of this counter is large, the locking competition is intense, or the thread switches frequently between user and kernel mode. You may also need to use the sample analyzer and other tools for further analysis.

The following list describes the counters in the asp.net and asp.net applications performance objects in detail. asp.net system performance counters

asp.net supports the following ASP.net system performance counters. They pool information about all asp.net applications on the WEB server computer, or they typically apply to systems that run the same application's ASP.net server. They may contain Web farms and Web gardens. Application restarts the number of times the application has been restarted during the lifetime of the WEB server. Every time a application_onend event occurs, the number of application restarts is increased once. An application reboot may occur for the following reasons: Change the Web.config file, change the assembly stored in the application/bin directory, or make too many changes to the Web form page. An unexpected increase in this counter may mean that an unknown problem will cause the WEB application to shut down. In such cases, the reason should be investigated as early as possible.

AttentionThe value is reset each time the Internet Information Services (IIS) host is restarted.Application RunningThe number of applications running on the server computer.Requests DisconnectedThe number of requests that were disconnected due to a communication failure.Requests QueuedThe number of requests waiting for a service in the queue. When this number increases linearly with the client load, the WEB server computer has reached the upper limit of the concurrent requests it can handle. The default maximum value for this counter is 5,000. You can change this setting in your computer's Machine.config file.Requests rejectedThe total number of requests that were not executed due to insufficient server resources to process the request. This counter represents the number of requests that return the 503 HTTP status code, which indicates that the server is too busy.Request Wait TimeThe number of seconds in the queue that the most recent request waits to process.Session state Server connections TotalThe total number of session-state connections for computers that store out-of-process session state data.Session SQL Server connections TotalThe total number of session-state connections for a Microsoft SQL Server™ database that stores session-state data.State Server Sessions abandonedThe number of user sessions that have been explicitly discarded. They are sessions that end with a specific user action, such as closing a browser or browsing to another site. This counter is used only for running the state Server service (aspnet_state) on the computer.State Server Sessions ActiveThe number of currently active user sessions. This counter is used only for running the state Server service (aspnet_state) on the computer.State Server Sessions Timed outThe number of user sessions that are inactive because the user is not active. This counter is used only for running the state Server service (aspnet_state) on the computer.State Server Sessions TotalThe number of sessions created during the lifetime of the process. This counter isState Server Sessions ActiveState Server Sessions abandonedAndState Server Sessions Timed outThe cumulative value. This counter is used only for running the state Server service (aspnet_state) on the computer.Worker Process RestartsThe number of times the worker process has been restarted on the server computer. If the worker process fails unexpectedly or is intentionally recycled, you can restart the worker process. When there is an unexpected increase in this counter, you should investigate the cause as early as possible.Worker Process RunningThe number of worker processes running on the server computer.asp.net application performance counters

asp.net supports the following application performance counters that you can use to monitor the performance of a single ASP.net application instance. Each of these counters has a unique instance__total__That aggregates counters for all applications on the WEB server (similar to the global counters described in the first section of this topic).__total__Instance is always available. When there are no applications on the server, these counters will show zero.Anonymous RequestsThe number of requests that use Anonymous authentication.Anonymous requests/secThe number of requests per second that use Anonymous authentication.Cache Total EntriesThe total number of items in the cache. This counter includes both caches that are used internally by the ASP.net page framework, and caches that are used externally through exposed APIs.Cache Total HitsTotal number of hits cached. This counter includes both caches that are used internally by the ASP.net page framework, and caches that are used externally through exposed APIs.Cache Total MissesThe number of cache requests that failed per application. This counter includes both a cache that is used internally by ASP.net, and a cache that is used externally through exposed APIs.Cache Total Hit RatioThe ratio of hits to misses in the cache. This counter includes both a cache that is used internally by ASP.net, and a cache that is used externally through exposed APIs.Cache Total turnover RateThe number of additions and removals to the total cache per second. This is useful for determining the efficiency of caching. If it is repeated very large, the cache cannot be used effectively.Cache API EntriesThe total number of items in the application cache.Cache API HitsThe total number of hits in the cache when caching is only accessed through the external cache APIs. This counter does not track caches that are used internally by ASP.net.Cache API missesThe total number of failed cache requests when accessed through an external cache API. This counter does not track caches that are used internally by ASP.net.Cache API Hit RatioThe ratio of cache hits to misses when accessed through an external cache API. This counter does not track caches that are used internally by ASP.net.Cache API turnover RateThe amount of cache increase or decrease per second when used through external APIs (excluding ASP.net cache that are used internally by the page framework). This is useful for determining the efficiency of caching. If it is repeated very large, the cache cannot be used effectively.compilations TotalThe total number of compilations that occurred during the lifetime of the current WEB server process. This behavior occurs when a file with an. aspx,. asmx,. ascx, or. ashx or a code-behind source file is dynamically compiled on the server.

Note This value begins to peak gradually when a request is made to all parts of the application. However, at compile time, the resulting binary data is saved to disk (in which the data is reused until its source file is changed). This means that even if the process restarts, the counter can remain 0 (inactive) until the application is modified or redeployed. Debugging Requests The number of requests that occurred when debugging was enabled. Errors During preprocessing The number of errors that occurred during parsing. Compilation and run-time errors are not included. Errors During Compilation The number of errors that occurred during dynamic compilation. Does not include profiling programs and run-time errors. Errors During Execution The total number of errors that occurred during the execution of the HTTP request. Does not include parsing programs and compilation errors. Errors unhandled During Execution The total number of unhandled errors that occurred during the execution of the HTTP request.

AttentionAn unhandled error is any unsaved Run-time exception that transforms the user code on the page and enters asp.net internal error-handling logic. This rule has an exception if a custom error is enabled and/or an error page is defined in the following cases. In user code, you define thePage_ErrorEvent and clears the error (using theHttpServerUtility.ClearErrormethod) or perform a redirect.Errors unhandled During execution/secThe number of unhandled exceptions that occurred per second during the execution of an HTTP request.Errors TotalThe total number of errors that occurred during the execution of the HTTP request. Includes any analyzer, compile, or run-time error. This counter isErrors During CompilationErrors During preprocessingAndErrors During ExecutionThe sum of the counters. A working WEB server should not generate an error. If errors occur in ASP.net Web applications, they may distort throughput results because of different code paths for error recovery. Investigate and fix any errors in the application before you perform the debugging.Errors total/secThe number of errors per second that occurred during the execution of an HTTP request. Includes any analyzer, compile, or run-time error.Output Cache EntriesThe total number of items in the output cache.Output Cache HitsThe total number of requests processed from the output cache.Output Cache missesThe number of output cache requests that failed per application.Output Cache Hit RatioThe percentage of all requests processed from the output cache.Output Cache turnover RateThe number of increase or decrease in output cache per second. If it is repeated very large, the cache cannot be used effectively.Pipeline Instance CountSpecifies the number of active request pipeline instances for the ASP.net application. Because only one execution thread can be run within a pipe instance, this value gives the maximum number of concurrent requests processed for an application. In most cases, it is best to control this value very low when you have a load, which indicates a high CPU usage.Request Bytes in totalThe total size, in bytes, of all requests.Request Bytes out TotalThe total size, in bytes, of the response sent to the client. This does not include a standard HTTP response header.Requests ExecutingThe number of requests currently executing.Requests FailedThe total number of failed requests. This counter is incremented if any and all status codes are greater than or equal to 400.

Note that the request for the resulting 401 status code will increase this counter and the Requests not Authorized counter. Requests that cause a 404 or 414 status code increase this counter and the Requests not Found counter. Requests that cause a 500 status code increase this counter and the Requests Timed out counter.

Note that the equivalent ASP counter is also incremented when the rejects the request (cannot be completed because the reject was done by IIS rather than by the process model). Requests not Found The number of requests that failed because the resource was not found (status code 404, 414). Requests not Authorized The number of requests that failed because of no authorization (status code 401). The number of requests that Requests succeeded has successfully executed (status code 200). The number of requests that the Requests Timed out has timed out (status code 500). The total number of requests since the Requests Total service was started. The number of requests executed by Requests/sec per second. That represents the current throughput of the application. Under a constant load, this value should be in a specific range (not including other server work, such as garbage collection, cache cleanup threads, and external server tools). The current number of active sessions in Sessions active . This counter is supported only by session state in memory. The number of sessions that Sessions abandoned has explicitly discarded. This counter is supported only by session state in memory. The number of sessions that Sessions Timed out timed out. This counter is supported only by session state in memory. The number of sessions that Sessions total timed out. This counter is supported only by session state in memory. The number of transactions aborted by transactions aborted . The number of transactions committed by transactions committed . The number of transactions in the transactions Pending . The total number of transactions since the transactions Total service started. The number of transactions initiated by Transactions/sec per second.   
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.