IIS 8 What's new – Application pool settings

Here is a list of enhancements to Application Pools in IIS 8.

Start Mode

A few web applications take a significant amount of time to start up. IIS by default only launches a worker process when the first request for the web application is received. So for the web applications that require a longer time to initialize, users might see slow responses.

For such applications it is a good idea to launch the worker process as soon as IIS is started. The application pools have a startMode setting which when set to AlwaysRunning launches the worker process for the application pool as soon as IIS is started.

IIS 8 provides you this setting in the Application Pool Settings UI.

image

This feature is also available in IIS 7.5, but you will have to edit the applicationHost.config directly to enable this feature.

<applicationPools>
    <add name="DefaultAppPool" startMode="AlwaysRunning" />

CPU Throttle

IIS 7.5 and earlier have a CPU monitoring feature that you could use to terminate a worker process, when its CPU usage goes beyond a certain limit. Its very useful in shared hosting scenarios.

image

In IIS 8 this feature has been enhanced. You can now instead of terminating the worker process, throttle it.

image

The KillW3wp will terminate the worker process like IIS 7.5. But if set to Throttle or ThrottleUnderLoad instead of terminating the worker process it will limits its CPU usage to the value set.

This is an application pool setting, so the limit you set applies to all the worker processes (web garden) of an application pool. So for an application pool with 5 worker processes, if the value for limit is set to 50000 the combined CPU usage of all the 5 worker processes is throttled at 50%.

Process Affinity Mask (64 Bit)

The UI now also exposes the smpProcessorAffinityMask2 metabase key. This is used when you enable the Processor Affinity setting.

image

Generate Process Model Event Log Entries

The logEventOnProcessModel metabase setting controls if an event has to be written when an application pool is shutdown because it was idle.

image

<applicationPools>
            <add name="DefaultAppPool" startMode="OnDemand">
                < processModel logEventOnProcessModel="IdleTimeout" />

When set to True an event similar to the one below is logged in the System Event Log when WAS shutdown the application pool.

image