WEBSITE

Improve IIS 7.0 Performance

10/10/2010 9:44:38 AM
When discussing performance, there are many factors to consider, such as hardware, other applications running, network bandwidth, and so on. We are going to focus on four options in IIS 7.0 that can be used to improve performance:
  • Output caching

  • Compression

  • Logging frequency

  • Windows Server Resource Manager (WSRM)

Output Caching

If you enable output caching, IIS will keep a copy of previously requested pages in memory. Subsequent requests will be returned from memory and will not be reprocessed by IIS. You can really appreciate the advantages of this feature when you’re using it with dynamic web content (for example, with an ASP.NET page that queries a SQL database for data to return to the client).

There are two output caching modes:

  • User mode

  • Kernel mode

Keep in mind the following when using kernel mode:

  • Kernel mode will not cache modules that run in user mode, such as authentication or authorization. For example, if you are using basic authentication with the kernel mode option, the content will not be cached.

  • Kernel mode supports the varyByHeaders attribute but not varyBYQuerystring.

Output caching can be configured on the web server or within individual websites on the server. You also have the option to choose when you would like to time out what is cached and force the server to reprocess the content. The timeout interval relies on how often the data changes in the web content. You can configure the File Caching Monitor to time out what is cached after either a specified amount of time or when a file changes. You can also define what file extensions the caching will apply to, as shown in Figure 1.

Figure 1. The Add Cache Rule dialog box.


Compression

You can use HTTP compression to improve transmission of data by utilizing less bandwidth. Compression can be applied to static files and/or dynamic applications (see Figure 2). So in what type of scenarios would you use compression, and what are some things to keep in mind? Consider the following:

  • Static compression: You use static compression when you need to improve transmission times and when working with graphic-intensive sites. Keep in mind that you use some CPU power for static compression, but compressed content can be cached.

  • Dynamic compression: You use dynamic compression when you have a small number of requests and/or limited network bandwidth. Keep in mind that you use CPU power and RAM for dynamic compression, and compressed content cannot be cached.

Figure 2. Configuring compression.


Compression can be configured at the web server level or at each individual website.

Note

Dynamic Content Compression is not installed with the default installation of the Web Server role. To add this functionality, you need to first add the Dynamic Content Compression role service in Server Manager, under the Web Server role.


Logging Frequency

Logging too much information has a negative impact on performance. A best practice with logging is to log as little information as possible for day-to-day normal utilization. If you are having issues with your site or web server, then it might be time to turn up the logging level to include failed request tracing and try to determine what is going on. To enable failed request tracing in IIS Manager, do the following:

1.
Select the website on which you would like to enable failed request tracing.

2.
In the Actions pane, click Failed Request Tracing to bring up the Edit Web Site Failed Request Tracing Settings dialog box, shown in Figure 3.

Figure 3. Configuring failed request tracing.


3.
Click the Enable box and select the directory where you would like to create the log files and the maximum number of trace files desired. It is a good idea to move the log file creation to a separate volume because you usually do not want logging files to grow on your system drive.

To configure other day-to-day logging, use the Logging applet to set items such as the following:

  • Format

  • Directory

  • Encoding

  • Log file rollover

Windows Server Resource Manager (WSRM)

WSRM enables you to control how server resources such as CPU and RAM are allocated to applications, services, and processes. You can use this tool to allocate CPU to application pools in IIS. You can see more information on WSRM and its use with IIS 7.0 at http://learn.iis.net/page.aspx/449/using-wsrm-to-manage-iis-70-apppool-cpu-utilization/.

Other  
 
Most View
Push Your Phone To Its Limits (Part 3)
iphone SDK 3 : Working with Databases - Processing Row Results
Through The Looking Glass (Part 2)
Windows Server 2012 MMC Administration (part 4) - Building custom MMCs - Creating the console
Samsung Galaxy Note 800 - A Fresh Challenge
Winddows Home Server 2011 : Tuning Windows Home Server Performance - Optimizing Applications
Nokia Lumia 820 - Windows Phone with Wireless Charging
Microsoft Exchange Server 2010 : Using Public Folder Databases (part 2) - Setting Public Folder Database Limits
How To Make Your Own USB Thumb Drive
10 Most Attractive Android Smartphones – Jan 2013
Top 10
Sharepoint 2013 : Farm Management - Disable a Timer Job,Start a Timer Job, Set the Schedule for a Timer Job
Sharepoint 2013 : Farm Management - Display Available Timer Jobs on the Farm, Get a Specific Timer Job, Enable a Timer Job
Sharepoint 2013 : Farm Management - Review Workflow Configuration Settings,Modify Workflow Configuration Settings
Sharepoint 2013 : Farm Management - Review SharePoint Designer Settings, Configure SharePoint Designer Settings
Sharepoint 2013 : Farm Management - Remove a Managed Path, Merge Log Files, End the Current Log File
SQL Server 2012 : Policy Based Management - Evaluating Policies
SQL Server 2012 : Defining Policies (part 3) - Creating Policies
SQL Server 2012 : Defining Policies (part 2) - Conditions
SQL Server 2012 : Defining Policies (part 1) - Management Facets
Microsoft Exchange Server 2010 : Configuring Anti-Spam and Message Filtering Options (part 4) - Preventing Internal Servers from Being Filtered