IIS 6 performance
Performance Tuning (IIS 6.0)
Web server administrators often monitor their Web servers to create a performance baseline. A performance baseline is a collection of data that indicates how the servers are performing when everything is running smoothly. Before making changes to their servers in a production environment (for example,. rolling out a new version of a Web application or hardware changes) administrators tune their servers in a test environment to achieve the established performance baseline. By tuning their servers in this way, they maximize throughput and minimize Web application response times, which create a better experience for clients accessing their Web servers.
Using HTTP Compression (IIS 6.0)
To more efficiently use available bandwidth, enable IIS HTTP compression. HTTP compression provides faster transmission time between compression-enabled browsers and IIS, regardless of whether your content is served from local storage or a UNC resource. You can compress static files and application response files. Compressing application response files is usually called dynamic compression.
This section includes the following information:
Enabling HTTP Compression (IIS 6.0)
You can enable HTTP compression server-wide or on a specific directory. HTTP compression improves bandwidth utilization and speeds up Web site performance. In addition, you can compress static or dynamic responses.
Important
You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName“mmc %systemroot%\system32\inetsrv\iis.msc”.
Procedures
To enable global HTTP compression by using IIS Manager
|
1. |
In IIS Manager, double-click the local computer, right-click the Web Sites folder, and then click Properties. |
|
2. |
Click theService tab, and in the HTTP compression section, select the Compress application files check box to enable compression for dynamic files. |
|
3. |
Select the Compress static files check box to enable compression for static files. |
|
4. |
In the Temporary directory box, type the path to a local directory or click Browse to locate a directory. Once a static file is compressed, it is cached in this temporary directory until it expires, or the content changes. The directory must be on the local drive of an NTFS–formatted partition. The directory cannot be compressed or shared, and the access control lists (ACLs) for the directory must include Full Control access to the identity of the application pool or to the IIS_WPG group. |
|
5. |
Under Maximum temporary directory size, click a folder size option. If you specify a maximum size under Limited to (in megabytes) (the default setting is 95 MB), then when the limit is reached, IIS automatically cleans up the temporary directory by applying the “least recently used” rule. |
|
6. |
Click Apply, and then click OK. |
Important
You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /user:MyComputer\Administratorcmd to open a command window with administrator rights and then type cscript.exeScriptName (include the script’s full path and any parameters).
To enable global HTTP compression by using Adsutil.vbs
|
1. |
Open a command prompt. |
|
2. |
To enable dynamic compression, type the following at the command prompt and then press ENTER:cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true |
|
3. |
To enable static compression, type the following at the command prompt and then press ENTER:cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true |
To enable HTTP Compression for Individual Sites and Site Elements
|
1. |
Disable global static compression by executing the following command at a command prompt:adsutil set w3svc/filters/compression/parameters/HcDoStaticCompression false |
|
2. |
Enable static compression at this directory by executing the following command at a command prompt:adsutil set w3svc/1/root/Home/StyleSheets/DoStaticCompression true |
To disable static compression for only a single directory, first enable global static compression (if it is disabled) and then disable static compression at that directory. For example, to enable static compression for a directory at http://www.contoso.com/Home/StyleSheets, perform the following steps:
|
1. |
Disable global static compression by executing the following command at a command prompt:adsutil set w3svc/filters/compression/parameters/HcDoStaticCompression true |
|
2. |
Enable static compression at this directory by executing the following command at a command prompt:adsutil set w3svc/1/root/Home/StyleSheets/DoStaticCompression false |
Related Information
| • | For a detailed discussion of how HTTP compression works, how to test compression, and detailed compression configuration options, see Using HTTP Compression for Faster Downloads. |
| • | For more information about improving the performance of IIS network resources using related features like bandwidth throttling and connection timeouts, see Administering Network Resources. |
| • | For information on configuring the types of files IIS compresses server-wide, see Customizing the File Types IIS Compresses. |
Enabling HTTP Keep-Alives (IIS 6.0)
Most Web browsers request that the server keep the client connection open while the server sends multiple elements (.htm files and .gif or .jpeg files) to the client. Keeping the client connection open in this way is referred to as an HTTP Keep-Alive. Keep-Alive is an HTTP specification that improves server performance. HTTP Keep-Alives are enabled by default.
Important
You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.
Procedures
To enable HTTP Keep-Alives
|
1. |
In IIS Manager, expand the local computer, expand the Web Sites folder, right-click the Web site, and click Properties. |
|
2. |
On the Web Site tab, in the Connections section, click the Enable HTTP Keep-Alives check box. |
|
3. |
Click Apply, and then click OK. |
Related Information
| • | For information about HTTP Keep-Alives, including security requirements and how disabling keep-alives can impact the server, see Enabling HTTP Keep-Alives to Keep Connections Open. |
| • | For more information about improving the performance of IIS network resources using related features like HTTP Compression, bandwidth throttling, and connection limits, see Administering Network Resources. |
Limiting Connections (IIS 6.0)
Connection limits restrict the number of simultaneous client connections to your Web sites and your Web server. Limiting connections conserves memory and protects against malicious attacks designed to overload your Web server with thousands of client requests.
Important
You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.
Procedures
To set a global WWW or FTP service connection limit
|
1. |
In IIS Manager, expand the local computer, right-click the Web Sites or FTP Sites folder, and then click Properties. |
|
2. |
Click the FTP Site tab to limit connections on the FTP service, or click the Performance tab to limit connections on the WWW service. |
|
3. |
Click the Connections limited to option, and in the box next to it, type the maximum number of simultaneous connections you want to allow on your Web or FTP service. |
|
4. |
Click Apply, and then click OK. |
To set a Web or FTP site connection limit
|
1. |
In IIS Manager, expand the local computer, expand the Web Sites or FTP Sites folder, right-click the Web or FTP site on which you want to set the connections limit, and click Properties. |
|
2. |
Click the FTP Site tab to limit connections on the FTP site, or click the Performance tab to limit connections on the Web site. |
|
3. |
Click the Connections limited to option, and in the box next to it, type the maximum number of simultaneous connections you want to allow on your Web or FTP site. |
|
4. |
Click Apply, and then click OK. |
Related Information
| • | For more detailed information about IIS connection limits, including the security ramifications of selecting the Unlimited option, see Limiting Connections to Manage Resources. |
| • | For more information about improving the performance of IIS network resources using related features like HTTP Compression and bandwidth throttling, see Administering Network Resources. |
Setting Connection Timeouts (IIS 6.0)
Connection time-outs help reduce the loss of processing resources consumed by idle connections. When you enable connection time-outs, IIS enforces the time-outs at the connection level.
Important
You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.
Procedures
To set a global WWW or FTP service connection time-out value
|
1. |
In IIS Manager, expand the local computer, right-click the Web Sites or FTP Sites folder, and click Properties. |
|
2. |
On the Web Site or FTP Site tab, in the Connection timeout box, type the maximum number of seconds that IIS should maintain an idle connection before resetting the connection. |
|
3. |
For the WWW service, verify that the Enable HTTP Keep-Alives box is selected. For more information, see Enabling HTTP Keep-Alives. |
|
4. |
Click Apply, and then click OK. |
To set a connection time-out value for a specific Web or FTP site
|
1. |
In IIS Manager, expand the local computer, expand the Web Sites or FTP Sites folder, right-click a Web or FTP site, and click Properties. |
|
2. |
On the Web Site or FTP Site tab, in the Connection timeout box, type the maximum number of seconds that IIS should maintain an idle connection before resetting the connection. |
|
3. |
For the WWW service, verify that the Enable HTTP Keep-Alives box is selected. For more information, see Enabling HTTP Keep-Alives. |
|
4. |
Click Apply, and then click OK. |
Related Information
| • | For more information about connection timeouts, including which counters to use to monitor connection timeouts, see Setting Connection Timeouts to Save Resources. |
| • | For more information about improving the performance of IIS network resources using related features like bandwidth throttling, HTTP Compression, and connection limits, see Administering Network Resources. |
| • | For information about setting CGI application timeouts, see Configuring CGI Application Timeouts. |
Throttling Bandwidth (IIS 6.0)
If the network or Internet connection used by your Web server is also used by other services such as e-mail or news, you may want to limit the bandwidth used by your Web server so it is available for those other services. If your Web server hosts more than one Web site, you can individually throttle the bandwidth used by each site.
This section includes the following information:
| • | Enabling Packet Scheduler: Describes how to enable Packet Scheduler when configuring a site to use bandwidth throttling without using IIS Manager. |
| • | Enabling Bandwidth Throttling: Describes how to enable bandwidth throttling globally for the WWW service and for individual Web sites. |
| • | Disabling Bandwidth Throttling: Describes how to disable bandwidth throttling for individual Web sites. |
Related Information
| • | For more information about when and where to use bandwidth throttling, see Throttling Bandwidth to Manage Service Availability. |
| • | For more information about improving the performance of IIS network resources using related features like HTTP Compression and connection limits, see Administering Network Resources. |
Enabling CPU Monitoring in IIS 6.0 (IIS 6.0)
The CPU monitoring feature monitors and automatically shuts down worker processes that consume large amounts of CPU time. CPU monitoring is enabled for individual application pools.
Before enabling CPU monitoring, take note of the following:
| • | IIS must be operating in Worker Worker Process Isolation Mode. |
| • | CPU monitoring is available only for application pools. |
| • | CPU monitoring does not apply to CGI applications. |
Important You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.
Enabling CPU Monitoring by Using IIS Manager
When you enable CPU monitoring by using IIS Manager, IIS allows, by default, a maximum CPU use of 50 percent. To change the default value, follow this procedure.
To enable CPU monitoring
|
1. |
In IIS Manager, expand the local computer, expand the Application Pools folder, right-click the application pool for which you want to enable CPU accounting, and click Properties. | |
|
2. |
Click the Performance tab, and select the Enable CPU monitoring check box. | |
|
3. |
In the Maximum CPU use box, click the up and down arrows to set the maximum percentage of the CPU the application pool should use. If the application pool uses more than the designated maximum, IIS generates an error in the Windows Events log. | |
|
4. |
In the Refresh CPU usage numbers (in minutes) box, click the up and down arrows to set the refresh rate. | |
|
5. |
In the Action performed when CPU usage exceeds maximum CPU use list box, click the appropriate action for the designated application pool. | |
| • | To have IIS write an event to the system log when the application pool reaches the maximum CPU usage, without shutting the application pool down, click No Action. | |
| • | To shut down the application pool in addition to logging an event in the system log, click Shutdown.By default, No Action is selected. | |
| ImportantShutting down the application pool shuts down all worker processes that serve that application pool. | ||
|
6. |
Click Apply, and then click OK. | |
Enabling CPU Monitoring from the Command Line
Enabling CPU monitoring from the command line can take as many as three steps:
| • | Set the CPULimit metabase property, which limits the worker processes in a specified application pool to a percentage of CPU time. |
| • | Set the CPUResetInterval metabase property, which specifies the time interval for CPU monitoring. |
| • | Set the CPUAction metabase property, which specifies the type of action you want IIS to take, such as write to the event log or shut down worker processes that exceed the CPU limit. |
Set the CPU Limit
TheCPULimitproperty configures the maximum percentage of CPU time that the worker processes in an application pool are allowed to consume over the period of time set by the CPUResetInterval property. If the limit set by the CPULimit property is exceeded, an event is written to the event log and an optional set of events can be triggered as determined by the CPUAction property. Setting the value of the CPULimit property to zero disables CPU monitoring.
To start CPU monitoring for an application pool, set the CPULimit property to a value greater than zero. To calculate the value to set, determine the maximum percentage of CPU time that you want the worker processes in an application pool to use — for example, 50 percent (which is the default value). Next multiply that percentage by 1,000 (50 1,000 = 50,000). Hence, to limit CPU use to 50 percent, set a value of 50000 for the CPU limit.
To set the CPU limit for CPU monitoring by using Adsutil.vbs
|
1. |
In the Run dialog box, type cmd, and then click OK. |
|
2. |
At the command prompt, type:cscript %Systemroot%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName/CPULimit nReplace n with the maximum percentage of CPU use to allow for the application pool in 1/1,000ths of a percentage. |
Set the CPU Reset Interval
After turning on CPU monitoring for the application, use Adsutil.vbs to set a value for the CPUResetInterval property, which specifies the reset period (in minutes) for CPU monitoring and throttling limits on the application pool. When the number of minutes elapsed since the last CPU monitoring reset equals the number specified by this property, IIS resets the CPU timers for both the logging and limit intervals. The default value is five minutes. Setting the value of this property to zero disables CPU monitoring.
Important
The value of the CpuResetInterval property must be greater than the time between logging operations; otherwise, IIS resets counters before logging has occurred, and CPU monitoring does not occur.
To set the CPU monitoring reset interval by using Adsutil.vbs
|
1. |
In the Run dialog box, type cmd, and then click OK. |
|
2. |
At the command prompt, type:cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName/CPUResetInterval nReplace n with the number of minutes for the reset interval. To disable CPU monitoring, type 0. |
Set the CPU Action
Finally, set the CPUAction property, which configures the actions that IIS takes when Microsoft® Windows NT® job objects run. Only one Windows NT job object exists per application pool; therefore, you must configure the CPUAction property separately for each application pool. If you do not set the CPUAction metabase property, IIS assigns the default value, which is zero (event logging only).
To set the CPUAction value by using Adsutil.vbs
|
1. |
In the Run dialog box, type cmd, and then click OK. |
|
2. |
At a command prompt, type:cscript %SystemDrive%\Inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/ApplicationPoolName/CPUAction ActionValueReplace ActionValue with the appropriate value: 0 logs an error without shutting down the process; 1 logs an error and shuts down the process. |
For more information about setting the CPU action, see the CPULimit Metabase Property, the CPUResetInterval Metabase Property, and theCPUAction Metabase Property.
Related Information
| • | For more information about CPU Monitoring, including explanations of the corresponding metabase properties and options for advanced CPU monitoring with Windows System Resource Manager, see Enabling CPU Monitoring. |
| • | For information about related features that help manage and conserve resources when IIS is running in Worker Process Isolation Mode, see Managing Resources in Worker Process Isolation Mode. |
Configuring Application Pool Queue-Length Limits (IIS 6.0)
Application pool queue-length limits prevent large numbers of requests from queuing up and overloading your server. When application pool queue-length limits are enabled, IIS monitors the number of requests for a designated application pool queue before queuing a new request. If adding the new request to the queue exceeds the queue size, the server rejects the request and sends an uncustomizable 503-error response to the client.
Important
You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName “mmc %systemroot%\system32\inetsrv\iis.msc”.
Procedures
To change an application pool queue-length limit using IIS Manager
|
1. |
In IIS Manager, expand the local computer, expand the Application Pools folder, right-click the application, and then click Properties. |
|
2. |
Click the Performance tab. |
|
3. |
In the Request queue limit section, select the Limit the kernel request queue to check box, and click the up and down arrows in the requests box to set the maximum number of queued requests. NoteIf you clear the Limit the kernel request queue to check box, or if you set the AppPoolQueueLength metabase property to zero, IIS does not enforce a kernel request limit. Without a kernel request limit, IIS could queue an unlimited number of requests and your server could potentially run out of memory. For this reason, you should set kernel request-queue limits on all production servers. |
|
4. |
Click Apply, and then click OK. |
Related Information
| • | For more information about application pool queue-length limits, as well as other features and strategies for managing memory resources on your server, see Optimizing Memory Usage. |
| • | For information about application pools, including guidelines for creating application pools, see Creating Application Pools. |
| • | For information about features and strategies to help you monitor the health and performance of your application pools, see Ensuring Application Health in Worker Process Isolation Mode. |
By:- Chandra Mani Bahttarai





March 7th, 2010 at 1:35 am
[...] Nix World » Blog Archive » IIS 6 performance Tags: Francisco ChronicleIt, Francisco ChronicleMicrosoft, Japan, Mary Hodges, network monitoring tool, professional service pack, server, service Published by admin on Mar 6, 2010 under 1 | Post your comment now Find out more: here. « dns servers ziggo [...]