Monitoring and Tuning Your Server |
IIS 5.0 runs in a set of multithreaded processes designed for efficient scaling on single-processor and multiprocessor systems. Threads are the sequences of execution in each process that run the process code on the processor. In the IIS 5.0 process, there is no simple association between threads and connections or between threads and requests, nor is there an easily quantifiable relationship between the optimum number of threads in the process and the number of files served, the number of requests filled, or the number of connections maintained.
The relationship between threads, connections, and requests is complex because IIS 5.0 uses the worker thread model, rather than the simpler, but less efficient, thread-per-client model. Instead of dedicating a thread to each connection or request, IIS 5.0 dedicates one pool of threads, the worker threads, to the task of accepting and monitoring all connections. This frees other threads to do the remaining work of the application, such as authenticating users; parsing client requests; locating, opening, and transmitting files, and managing internal data structures.
Even though you cannot associate individual threads with connections or requests, you can:
Several tools monitor or enumerate the threads in a process, including Process Monitor, Process Viewer, Process Explode, PerfLog, and PerfMon. Individual threads are difficult to monitor, especially if they frequently start and stop. Threads are also costly to measure. Be sure to monitor the overhead (by using Process: % Processor Time) of the process in which your tool runs, and subtract it from the data you collect.
Table 5.6 lists the counters that monitor threads. You can add to this list any counters you use to associate numbers of threads with performance, such as Web Service\ Current Connections, Web Service\ Bytes/sec, or Server\ Logon/sec.
Table 5.6 Counters for Monitoring IIS 5.0 Threads
Counter | Indicates |
Process\ Thread Count: Inetinfo | The number of threads created by the process. This counter does not indicate which threads are busy and which are idle.
This counter displays the last observed value, not an average. |
Thread\ % Processor Time: Inetinfo => Thread # | How much processor time each thread of the Inetinfo process is using. |
Thread\ Context Switches/sec: Inetinfo => Thread # | How many times the threads of the IIS 5.0 service are switched onto and off processor. This counter indicates the activity of IIS 5.0 service process threads. |
See the following: