What is it?

ASP.NET Logo

The .NET Framework 4.5.1 introduces a nice new feature called App Suspend to improve web application performance, and most importantly improve the end-user experience with virtually zero setup required.

MSDN claim that this feature can improve web application startup performance by 90%!!!

 

Background

Ordinarily, IIS terminates the worker process(es) to conserve system resources when they become idle. When a request is later received, IIS will spin up the application worker process(es) to serve the incoming request. Although this conserves CPU cycles and memory, users will notice significant application slow downs.

App Suspend instead chooses to store the state of the IIS application worker processes in virtual memory when idle. The benefit of this approach is near instant response times as application state has been maintained in memory.

Applications can enter one of three states, sites will enter an ‘Active' state when started for the first time. After idling for an extended period of time, sites will enter a ‘Suspended' state. When a request is received, the app will resume back to the ‘Active' state.

APP_SUSPEND_STATES

Requirements

You will need IIS 8.5 i.e. Window Server 2012 R2 onwards to use this feature.

 

How Do I Enable It?

A new Application Pool setting called ‘Idle Time-out Action‘ can be found in IIS. Simply set it to ‘Suspend' to enable it.

IIS Application Pool Settings Screenshot

Shane Bartholomeusz