Configure Application Pool Performance
Applies To: Windows Server 2003, Windows Server 2003 with SP1
In worker process isolation mode, Internet Information Services (IIS) 6.0 can be configured to optimize the performance of an application pool, allowing you optimize the performance of your Web applications. Some of the ways to accomplish this include configuring an application pool to limit the size of its request queue, enabling CPU monitoring to allow the server to take action when CPU usage exceeds maximum CPU use, configuring the server to shut down a worker process after being idle for a specified number of minutes, and creating a Web garden, which is an application pools with more than one worker process assigned. Setting these configurations helps you manage the resources on a Web server.
Requirements
Mode: This feature of IIS 6.0 is available only when IIS is running in worker process isolation mode.
Credentials: Membership in the Administrators group on the local computer.
Tools: Iis.msc.
Recommendation
As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Run as command to run IIS Manager as an administrator. At the command prompt, type **runas /user:**administrative_accountname mmc %systemroot%\system32\inetsrv\iis.msc.
Procedures
When performance is degraded by too many requests or by problem applications, and you want to configure the application pool to improve the performance of the worker processes assigned to the pool, consider the following:
When an application pool receives requests faster than it can handle them, the requests might consume all of the application pools memory. This could happen when the requests queue size limit is large and legitimate requests are coming in at a rapid rate, or during a denial of service attack. To prevent requests from consuming all of an application pools memory, limit the size of the request queue for the application pool.
When problem applications consume excessive CPU resources, you need a way to manage them. In worker process isolation mode, you can enable CPU monitoring, configure CPU limits, and direct IIS to take action when a worker process exceeds the CPU limit set for it.
Web gardens are application pools with more than one worker process assigned. Create a Web garden to achieve more robust performance when resources often get tied up with a single worker process, or when you need to smooth out the handling of a workload.
To configure idle timeout
In IIS Manager, expand the local computer, right-click the application pool you want to configure, and then click Properties.
On the Performance tab, under Idle Timeout, select the Shutdown worker process after being idle for (time in minutes) check box.
In the text box to the right of Shutdown worker process after being idle for (time in minutes), type the number of minutes to elapse before the worker process is recycled, and then click OK.
To configure a request queue limit
In IIS Manager, expand the local computer, right-click the application pool you want to configure, and then click Properties.
On the Performance tab, select the Limit the kernel request queue (number of requests) check box.
In the text box to the right of Limit the kernel request queue (number of requests), type the maximum number of requests to allow in the request queue, and then click OK.
To configure CPU monitoring
In IIS Manager, expand the local computer, right-click the application pool you want to configure, and then click Properties.
On the Performance tab, select the Enable CPU monitoring check box.
In the box to the right of Maximum CPU use (percentage), type the percent maximum CPU threshold.
In the text box to the right of Refresh CPU usage numbers (in minutes), type the number of minutes before the CPU usage numbers are refreshed.
In the drop-down list box below Action performed when CPU usage exceeds maximum CPU use, select the action to take, and then click OK.
To configure a Web garden
In IIS Manager, expand the local computer, right-click the application pool you want to configure, and then click Properties.
On the Performance tab, under Web garden, in the Maximum number of worker processes textbox, type the number of worker processes to assign to the application pool, and then click OK.