Improving Processor Performance

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

If your data on processor performance indicates that processor queues are developing regularly or while a server is handling large numbers of connections, start by monitoring the server's memory. Rule out a memory bottleneck or add more memory before (or in addition to) adding or upgrading processors.

In addition to the methods for optimizing thread values (discussed in Monitoring Threads), consider making the following adjustments.

Upgrade the L2 cache

When you add or upgrade processors, choose processors with a large secondary (L2) cache. Server applications, such as IIS, benefit from a large processor cache because their instruction paths involve many different components. A large processor cache (2 MB or more if external, up to the maximum available if on the CPU chip) is recommended to improve performance on active servers running IIS 6.0.

Add network adapters

If you are administering a multiprocessor system that does not distribute interrupts symmetrically, you can improve the distribution of the processor workload by adding network adapters so that there is one adapter for every processor. Generally, you only add adapters when you need to improve the throughput of your system. Network adapters, like any additional hardware, have some intrinsic overhead. However, if one of the processors is nearly always active (that is, if Processor\% Processor Time = 100) and more than half of its time is spent servicing deferred procedure calls (if Processor\% DPC Time > 50), then adding an adapter is likely to improve system performance, as long as the available network bandwidth is not already saturated.

Upgrade network adapters

If you are adding or upgrading network adapters, choose those with drivers that support interrupt moderation cards, which can perform transfers in the background without processor help. Interrupt moderation prevents the processor from being overwhelmed by bursts of interrupts. Consult the driver manufacturer for details. Also, if at all possible, use adapters that support TCP checksum offloading.

Upgrade to a multiprocessor computer

A server-application environment, such as e-commerce sites running COM+ applications, is much more processor-intensive than a typical file or print server environment because much more processing is taking place at the server. For that reason, high-end multiprocessor computers can increase performance in server-application environments. IIS 6.0 introduces a new kernel-mode driver for HTTP parsing and caching that is tuned to increase Web server throughput and scalability of multiprocessor computers.

Assign processor affinity to better use CPU caching

To efficiently use CPU caches on multiprocessor servers, you can configure application pools to establish affinity between worker processes and the processors. Processor affinity forces worker processes to run on a specific microprocessor or CPU, and applies to all worker processes serving a particular application pool. You can also use processor affinity with Web gardens that run on multiprocessor computers where clusters of CPUs are dedicated to specific application pools.

Controlling processor affinity can improve performance by reducing the number of processor cache flushes as threads move from one processor to another. For example, you might be able to reduce cache flushes for dedicated servers by assigning processor affinity. However, the performance trade-off is that dedicating a program to a particular processor might prevent other program threads from migrating to the least-busy processor.

If you want to assign a particular process or program to a single processor to improve its performance — possibly at the expense of other processes — configure the SMPAffinitized Metabase Property and SMPProcessorAffinityMask Metabase Property. For more information about assigning processor affinity, including how to configure these metabase properties, see Running IIS 6.0 as an Application Server.

Limit connections

If you cannot upgrade or add processors, consider reducing the maximum number of connections that each IIS 6.0 service accepts. Limiting connections can result in connections being blocked or rejected, but it helps ensure that accepted connections are processed promptly.

Adjust the maximum number of threads

IIS 6.0 tunes the number of threads in its process dynamically. The dynamic values are usually optimal; in extreme cases of very active or underused processors, however, it might help to adjust the maximum number of threads. If you change the maximum number of threads, continue careful testing to make sure that the change has improved performance. The difference is usually quite subtle.

Redesign the Web site

You can improve performance and reduce the processor workload by optimizing database use, calling compiled components from scripts in ASP pages, using Internet Server API (ISAPI) instead of ASP (and ASP or ISAPI instead of CGI applications), and eliminating large bitmapped images or optimizing them to reduce file size. For more information about optimizing Web site performance, see Improving Application Performance.