IIS 8.0 Performance Sensitive Configuration Parameters
IIS 8.0 is
the version that ships as part of Windows Server 2012. It uses process model similar to IIS
6.0. A kernel mode web driver (http.sys)
receives and routes HTTP requests, and it can satisfy requests from its
response cache. Worker processes
register for URL subspaces, and http.sys routes the requests to appropriate
process (or set of processes for application pools).
Http.sys is
responsible for connection management and request handling. The request can be served from the http.sys
cache or passed to a worker process for further handling. Some web application platforms such as
ASP.NET, provides mechanism to enable any dynamic content to be cached in the
kernel-mode cache. The static file
handler in IIS 8.0 automatically caches frequently requested files in http.sys.
Web server
has kernel mode and user mode components, both components must be tuned for
optimal performance.
Kernel-Mode
Driver / Http.sys
|
|
Caching
|
▫ Configurable attributes - UriEnableCache,
UriMaxCacheMegabyteCount, UriMaxUriBytes, UriScavengerPeriod
▫ Consider disabling it when Kernel: URI Cache Hit %
is low
▫ If enough memory is available, consider increasing
the limit. If memory is limited and large entries are crowding out smaller
ones, it might be helpful to lower the limit
▫ In case of too many cache flush / churn (Kernel: URI
Cache Flushes), consider configuring the value of UriScavengerPeriod
|
Requests and connections
|
▫
In Windows
Server 2012, http.sys manages connections automatically
|
User-Mode /
Worker Process
|
|
Application Pools
|
▫
Configurable
attributes – queueLength, enable32BitAppOnWin64
▫
Indicates to
http.sys that how many requests are queued for an application pool before
future requests are rejected with a 503 error message
▫
Consider
enabling 32-bit mode if memory consumption is a concern
|
ASP.NET
Concurrency
|
▫ Configurable attributes – MaxConcurrentRequestPerCpu
▫ Limits the maximum number of concurrently executing
ASP.NET requests on a system.
▫ Consider increasing this limit on systems that run applications
that perform long, synchronous I/O operations
|
Caching
|
▫
Configurable
attributes - Enabled, enableKernelCache, maxCacheSize, maxResponseSize
▫
Disabling the
user-mode cache doesn’t disable the kernel-mode cache
▫
Consider
disabling it completely if cache hit ratio is very low
▫
Caching large,
frequently requested files can reduce CPU usage, disk access and associated
latencies
|
Compression
|
▫ Configurable attributes - staticCompression-EnableCpuUsage,
staticCompression-DisableCpuUsage, dynamicCompression-EnableCpuUsage,
dynamicCompression-DisableCpuUsage, enableKernelCache, directory,
doDiskSpaceLimiting, maxDiskSpaceUsage, doStaticCompression,
doDynamicCompression
▫ Compression reduces bandwidth usage but increases
CPU usage. IIS 8.0 automatically
disables compression if steady-state CPU increases above the Disable
threshold.
▫ Consider moving the directory (where compressed
version of static files are temporary stored) off to the system drive if it is
accessed frequently
▫ Consider enabling compression for dynamic content,
if response are large and CPU utilization is low
|
Default Document List
|
▫
Configurable
attributes - Enabled,
▫
When an HTTP
request does not specify a file name, the default document module searches
the list of allowed default documents for each name in the file system. This
can adversely affect performance, especially if reaching the content requires
making a network round trip or touching a disk.
▫
Overhead can be
avoided by selectively disabling default documents and by reducing or
ordering the list of documents
|
Central Binary
Logging
|
▫ Configurable attributes – centralLogFileMode,
enabled, directory
▫ Binary IIS logging reduces CPU usage, disk I/O and
disk space usage
▫ Consider moving the location of the central log file
off the system partition and onto a dedicated logging partition to avoid
contention between system activities and logging activities
|
IIS 8.0 Modules
|
▫
Consider
removing all modules that are not relevant to a particular site for
conserving CPU cycles and memory
|
Worker Process and
Recycling
|
▫ Configurable attributes – memory, privateMemory,
requests, time
▫ Consider turning on the recycling option during
acute situation like memory leaks, increasing memory load, unresponsive or
idle worker processes
▫ When a worker process is recycled, the queued and
executing requests are drained and a new process is simultaneously started to
service new requests
|
There are
few more tuning parameters for IIS 8.0 but are very specific to requirements
and won’t be discussing in this article
ü Classic ASP Settings
ü Secure Socket Layer (SSL) settings
ü ISAPI settings
ü Installation of filters that are not
cache-aware
ü Common Gateway Interface (CGI)
requests\
References:
Comments
Post a Comment