Essential WWW Service Performance Counter

For list of others essential performance counters for applications based on Windows platform see here.


When there is a requirement of collecting performance counters during performance testing, it becomes tough to select few counters from existing many.  All counters are important in its context and cannot be simply ignored.  So, it is very important to recheck the list of counters that needs to be monitored before every performance run.  You might need to change the counters as per yours requirements.

Following are some of the WWW Service counters, that I find bare essential to start with though.  The list of counters and its preferred  / threshold values are being collected from multiple relevant blogs / links and have been mentioned in the ‘References’ section below.


Performance Object
Performance Counter
Preferred Value
Bytes (Sent, Received, and Transferred) Counters
Bytes Sent / sec
None
Bytes Total/sec
None
Connections and Attempts Counters
Current Connections
As high as possible
Connection Attempts/sec
None
Requests Counters
Total Method Requests/sec
As high as possible
CGI Requests and ISAPI Extension Requests Counters
ISAPI Extension Requests/sec
None
File Counters for the Web Service Cache Object
File Cache Hits %
As high as possible
File Cache Misses
As low as possible
File Cache Flushes
As low as possible
URI Counters for the Web Service Cache Object
URI Cache Misses
As low as possible
URI Cache Hits %
None
URI Cache Flushes
As low as possible
Kernel Counters for the Web Service Cache Object
Kernel: URI Cache Hits%
As high as possible
Kernel URI Cache Misses
As low as possible
Kernel: URI Cache Flushes
As low as possible


Bytes (Sent, Received, and Transferred) Counters

Bytes Sent / sec
The rate, in seconds, at which data bytes have been sent by the WWW service
Preferred Value:  None
Threshold Value:  None
Notes:
  1. It indicates the throughput of web service.
  2. If throughput is not increasing or getting plateau on increasing the number of total methods requests / sec, then it means, WWW service is not able to handle all http requests and few requests are getting rejects / queued
  3. Data collected by the IIS 6.0 service counters underestimates the total number of bytes that the IIS 6.0 services actually transmit to the network. Because these values are collected at the application layer, they measure data only. They do not measure protocol headers, control packets, or retransmitted bytes.
  4. In general, the bytes counted by the services represent 60 to 70 percent of the total number of bytes transmitted by the services on the network. If the sum of bytes for all services accounts for two-thirds or more of total network bandwidth, you can assume that your network is running at or near the total capacity of its communications link

Bytes Total/sec
The sum of Bytes Sent/sec and Bytes Received/sec
Preferred Value:  None
Threshold Value:  None
Notes:
  1. Correlate with NIC bandwidth and find out if there is any network related bottleneck because of WWW service.
  2. The value of it should be as high as possible.

Connections and Attempts Counters

Current Connections
The number of active connections to the WWW service
Preferred Value:  As high as possible
Threshold Value:  None
Notes:
  1. Each connection that an IIS 6.0 service establishes consumes processor time. The network adapter interrupts the processor to signal that a client has requested a connection. Further processing is required to establish and maintain the connection, to fulfill client requests sent over the connection, and — when the connection is closed — to delete the structures that serviced the connection. Each time a connection is established, the load on the server increases.  A curve in the graph of the Current Connections counter on any IIS 6.0 service performance objects that reaches a high value and then plateaus. This pattern often indicates that additional connections are being blocked or rejected.
  2. Ideally when number of concurrent users increase, current connections should also follow.  In case, current connections are not increasing or getting plateau, which might means maximum connection limit has been reached and rest of the users connections are being rejected.
Connection Attempts/sec
The rate, in seconds, at which connections to the WWW service have been attempted since the service started
Preferred Value:  None
Threshold Value:  None
Notes:
  1. In case of failure point, it suggests the connections that were being attempted and provide threshold information in that term (connection attempts / sec).  It can be important metrics as it can be associated with performance requirements also.
  2. It can also provide a basis for validating the load on to the system


Requests Counters


Total Method Requests/sec
The rate, in seconds, at which all HTTP requests have been received
Preferred Value:  As high as possible
Threshold Value:  None
Notes:
  1. It can be interesting to compare this with "ASP.NET Applications\Requests/sec" and "Web Service\ISAPI Extension Requests/sec" in order to see the percentage of static pages served versus pages rendered by aspnet_isapi.dll.
  2. If numbers of current connections are increasing but ‘Total Methods Requests / sec’ is not increasing than it means there are connections which are idle / waiting and not invoking any further requests.  In that case http keep-alive settings need to be looked into it.  In a way, it represents idle sessions.


CGI Requests and ISAPI Extension Requests Counters


ISAPI Extension Requests/sec
The rate, in seconds, at which ISAPI extension requests are being processed by the WWW service
Preferred Value:  None
Threshold Value:  None
Notes:
  1. Used primarily as a metric for diagnosing performance issues. It can be interesting to compare this with "ASP.NET Applications\Requests/sec" and "Web Service\Total Method Requests/sec." Note that this includes requests to all ISAPI extensions, not just aspnet_isapi.dll.
  2. When number of total methods requests / sec increases, ISAPI extension requests should also increase.  If not then application server seems to be queuing these requests.

File Counters for the Web Service Cache Object
The IIS file cache stores file contents in memory. If the file is larger than the 256 KB default maximum file size, IIS creates a file handle, passes the handle to HTTP.sys, and then closes the handle. The maximum file size is controlled by the MaxCachedFileSize registry key.

File Cache Hits %
The ratio of user-mode file cache hits to total cache requests that have been made since the WWW service started up.
Preferred Value:  As high as possible
Threshold Value:  None
Notes:
  1. This value might be low if the Kernel URI cache hits percentage is high.
  2. It provides IIS user-mode cache utilization, if the utilization is low it should be correlated with File Cache Misses also as it provides the real picture
  3. If File Cache Hits % are low but kernel level URI Cache Hits% are more then it is good thing but if both are low then it means IIS caching is not being used properly
File Cache Misses
The numbers of unsuccessful lookups in the user-mode file cache that has been made since the WWW service started.
Preferred Value:  As low as possible
Threshold Value:  None
Notes:
  1. Misses is always counted whether kernel mode is used or user mode cache is used
File Cache Flushes
The number of files that have been removed from the user-mode cache since the WWW service started
Preferred Value:  As low as possible
Threshold Value:  None
Notes:
  1. If flushes are more then IIS user-mode cache might not be utilized properly




URI Counters for the Web Service Cache Object
The user-mode URI cache is known as the URI cache. The URI cache stores metadata about a URL. Metadata can include a variety of configuration data, including data about headers and authentication. This configuration data is stored in the IIS Admin service. The URI cache stores the metadata as an object. For each request that reaches IIS user mode, the worker process checks the URI cache to see if the object for the requested URL has been cached. If the object has not been cached, the worker process must call the IIS Admin service for the appropriate metadata. This call is expensive from a performance and scalability standpoint. If the URI cache has a stored object for the URL, the request pulls in the object and continues processing

URI Cache Misses
The number of unsuccessful lookups that have been made in the user-mode URI cache since the WWW service started
Preferred Value:  As low as possible
Threshold Value:  None
Notes:
  1. The value of this counter increases when IIS cannot locate requested content in either the HTTP.sys response cache or the IIS file cache, and must locate the requested content on the hard disk.
  2. If the value of this counter is low, responses are being sent from either the IIS file cache or the HTTP.sys response cache.
URI Cache Hits %
The ratio of URI Cache Hits to total cache requests that have occurred since the WWW service started.
Preferred Value:  None
Threshold Value:  None
Notes:
  1. Depends on content. If content cannot be cached in the HTTP.sys response cache, the value of this counter should be as high as possible. If your content can be stored in the HTTP.sys response cache, the value of this counter should be low.
  2. Cache hits percentage should be more but at the same time correlated it with kernel side caching hits as well
URI Cache Flushes
The total number of URI cache flushes that have occurred since the WWW service started
Preferred Value:   As low as possible
Threshold Value:  None
Notes:
  1. More flushes mean cache is not being utilized properly.


Kernel Counters for the Web Service Cache Object
1.  HTTP response cache is known as kernel URI cache.
2.  Only responses that will be cached in the kernel are responses to HTTP GET requests.
3.  ISAPI responses can also be cached in kernel by setting some response headers.

Kernel: URI Cache Hits%
The ratio of Kernel: URI Cache Hits to total cache requests since the WWW service started.
Preferred Value:  As high as possible
Threshold Value:  None
Notes:
  1. Applies to static unauthenticated content and dynamic content that is marked as cacheable.
  2. Hits percentage tells about cache utilization
Kernel URI Cache Misses
The number of unsuccessful lookups in the kernel URI cache that have occurred since the WWW service started.
Preferred Value:  As low as possible, relative to the number of requests
Threshold Value:  None
Notes:
  1. Each request for dynamic content increases the value of the counter by one
Kernel: URI Cache Flushes
The number of kernel URI cache flushes that have occurred since the WWW service started
Preferred Value:  As low as possible, relative to the number of requests
Threshold Value:  None
Notes:
  1. This number increases every time a file is flushed from the HTTP.sys response cache (HTTP.sys is the kernel-mode device driver in IIS 6.0), which means that the content has not been accessed in the past 2–4 minutes. The only way to decrease this number is to flush the cache less often, although frequent flushing can cause HTTP.sys to use more memory for content that is not being accessed.

References:

Comments

  1. Hi Rahul, nicely done. Thanks for the bit of information. What performance counter do you look at when you want a transaction/sec for IIS entirely? Does the webservice\total method request/sec translate to all GET and PUT requests?
    Thanks.

    ReplyDelete

Post a Comment

Popular posts from this blog

Performance Test Run Report Template

Bugs Management in Agile Project

Understanding Blockchain