4. IIS CPU throttling
Managing CPU resources on farms of web servers in a multi-tenant
shared hosting environment can be challenging. When you are hosting
websites and applications from many different customers, each of them
wants to get its fair share of resources. It’s clearly undesirable when
one customer’s site consumes so much CPU resources that other
customers’ sites are starved of the resources they need to process
client requests.
IIS CPU
throttling is designed to prevent one website from hogging all the
processing resources on the web server. Previous versions of IIS
included a rudimentary form of CPU throttling
that basically just turned off a site once the CPU resources being
consumed by the site reached a certain threshold by killing the worker
processes associated with the site. Of course, this had the undesirable
effect of temporarily preventing clients from accessing the site. As a
result, web administrators sometimes used Windows System Resource
Manager (WSRM) with IIS to control the allocation of processor and
memory resources among multiple sites based on business priorities.
CPU throttling has been completely redesigned in IIS 8 to provide
real CPU throttling instead of just on/off switching. Now you can
configure an application
pool to throttle the CPU usage so that it cannot consume more CPU
processing than a user-specified threshold, and the Windows kernel will
make sure that the worker process and all child processes stay below
that level. Alternatively, you can configure IIS
to throttle an application pool when the system is under load, which
allows your application pool to consume more resources than your
specified level when the system is idle because the Windows kernel will
throttle the worker process and all child processes only when the
system comes under load.
Configuring CPU throttling
CPU throttling
can be configured in IIS 8 at the application pool level. To do this,
open the Advanced Settings dialog box for your application pool in IIS Manager and configure the settings in the CPU section (see Figure 3).
You can also configure a default CPU throttling value for all application
pools on the server by clicking Set Application Pool Defaults in the
Actions pane when the Application Pools node is selected in IIS Manager.