Monitoring Connections

Applies To: Windows Server 2003, Windows Server 2003 with SP1

It is important to determine how your server responds when it is managing different numbers of connections. After collecting data on connection trends, you can associate data about general server performance with the number of connections being served.

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.

IIS 6.0 includes several features to optimize its handling of connections. For example, the HTTP Keep-Alives feature, which is enabled by default, maintains an open connection between the server and browser across multiple requests until an entire Web page is downloaded. This feature significantly improves bandwidth performance on most servers and improves response times for clients. For more information about HTTP Keep-Alives, see Enabling HTTP Keep-Alives to Keep Connections Open.

You can use IIS 6.0 logging to monitor the number of connections that your server makes and to track patterns of client demand for your server. Table 6.20 lists the counters that you can use with Performance Logs and Alerts to monitor connections to IIS 6.0.

Table 6.20   Performance Counters for IIS 6.0 service connections/p>

Object\Counter Value

Web Service\Current Connections FTP Service\Current Connections

The number of connections maintained by the service during the most recent sample interval.

Web Service\Maximum Connections FTP Service\Maximum Connections

The maximum level of simultaneous connections since the server started up.

Because these counters display the last observed value, and not an average, you must log their values over time to get a reliable sample. These counters can exaggerate the number of simultaneous connections because, at any given moment, some entries may not have been deleted even though the connections on which they are based have been closed.

For more information about configuring and interpreting IIS 6.0 logs, see Analyzing Log Files.

Analyzing Connection Data

Identify patterns of client demand for your server by monitoring the number of connections. Log connection data at regular time intervals, and look at the number of connections served during each interval. Observe the size of the processor queue and the usage on each processor during periods of small, moderate, and large numbers of connections. This data shows how your configuration responds to each load level.

You can identify a processor bottleneck during a given time interval by observing one of the following:

  • A long, sustained processor queue (with more than two threads).

  • High usage rates on one or more processors.

  • A curve in the graph of the Current Connections counter on any IIS 6.0 service performance object that reaches a high value and then plateaus. This pattern often indicates that additional connections are being blocked or rejected.

The Active Server Pages, Web Service, FTP Service, and SMTP Server counters collect data at the OSI application layer. If any connections are blocked, rejected, or reset between the transport and application layers, counts of TCP/IP connections might not equal the sum of HTTP, FTP, and SMTP connections. For information about monitoring connections at lower layers, see Monitoring Network Activity.

Optimizing Connections

To prevent processor bottlenecks, make certain that a lengthy processor queue is not forming when you serve large numbers of connections. You can usually avoid a bottleneck during peak usage by setting the connection limit to twice the average value of the Current Connections counter.

If the processor regularly develops a bottleneck when servicing large numbers of connections, consider upgrading or adding processors, or limit the maximum number of connections on the server. Limiting connections can cause the server to block or reject connections, but it helps to ensure that accepted connections are processed promptly.

For information about limiting connections, including how to configure this setting, see Limiting Connections to Manage Resources.