HTTP Compression, Internet Information Services 6.0, and SharePoint Products and TechnologiesPerformance
A recent discussion on Garbage Collection management on 64-bit Web servers hosting Microsoft Office SharePoint Server 2007 led into a discussion on rendering performance, particularly steps to reduce overall rendering time at the client. While monitoring client rendering can be achieved to some degree through measuring TTLB - purely in ensuring pages are served in a timely manner (see ASP.NET Performance Monitoring, and When to Alert Administrators for monitoring recommendations), there are too many variables that can result in overall performance variations to include browser, hardware, machine state, etc. The most commonly implemented measures to improve client-side performance are object and output caching natively within Microsoft Office SharePoint Server 2007; however, often overlooked as a performance improvement mechanism is HTTP compression in Internet Information Services 6.0. This article describes the basic steps to enabling HTTP compression in Internet Information Services 6.0.
Step 1 Enable Compression (Global)
- Open a Command Prompt and run the following script:
cscript C:InetpubAdminScriptsadsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression trueto enable compression on all Web applications installed on the current server farm. (See later in this article references to enabling compression on sites and site elements).
Step 2 Specify File Extensions
- Open a Command Prompt and run the following script:
Step 3 Create a Web Service Extension
Create a Web Service Extension referencing the gzip assembly for compression:
- Open Internet Information Services 6.0 Manager, expand the <SERVER_NAME> (local computer) node and right-click the Web Service Extensions node.
- Select Add a new Web service extension… from the menu.
- Specify a descriptive name for your Web Service Extension, for example, Compression, IIS Compression, etc. in the Extension name: field.
- Click Add… under Required files… and a reference to C:WINDOWSSystem32inetsrvgzip.dll.
- Select the checkbox labeled Set extension status to allowed and click OK on the New Web Service Extension window.
Step 4 Configure the IIS MetaBase
- Open C:WINDOWSsystem32inetsrvMetaBase.xml in a text editor (Notepad)
- Locate the
- Find the HcScriptFileExtension metabase property and add aspx and asmx to the existing list ensuring the entries conform to the existing format, next modify the HcFileExtensions metabase property to specify any additional files to be compressed aside from those configured in the previous steps through adsutil.vbs. The HcScriptFileExtension metabase property specifies dynamic files to be compressed when HTTP compression is enabled whereas the HcFileExtensions metabase property specifies static files. NOTE Changes should be applied to both the deflate and gzip compression schemes.
- Modify the HcDynamicCompressionLevel to a value between 0 and 10, 0 being low compression and 10 being maximum compression. The HcDynamicalCompressionLevel
NOTE You should consider testing the impact of varying compression levels in a laboratory environment closely monitoring CPU utilization and potential impact to your Web servers. Typically a compression level between 7 and 9 provides optimum performance vs. CPU load in most circumstances. If you are running IIS 7.0 see http://msdn2.microsoft.com/en-us/library/bb386460(vs.85).aspx for a description of IIS 6.0 to IIS 7.0 Metabase property mappings.
Sample MetaBase.xml [Snippet]
In the sample metabase snippet above both deflate and gzip are enabled, it is not recommended to disable one or the other due to potential for unintended consequences such as failure to compress responses to a particular browser, e.g. compatibility issues. In some cases you may wish to enable compression at only the site or site element level as opposed to global application. To disable compression open a Command Prompt and run the following script:
cscript C:InetpubAdminScriptsadsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression false. To enable compression on sites or individual site elements see http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/25d2170b-09c0-45fd-8da4-898cf9a7d568.mspx?mfr=true.
Step 5 Restart the World Wide Web Publishing Service
- Open a Command Prompt and enter
NET STOP W3SVCand allow the World Wide Web Publishing Service to stop. When the World Wide Web Publishing Service has stopped, enter
NET START W3SVC.
To determine whether or not affordable gains were provided through enabling HTTP compression you should baseline server performance both prior to and following enabling of HTTP compression using the Processor% Processor Time and Network InterfaceBytes Sent/sec performance monitor counters. Generally where the Processor% Processor Time value exceeds 80%, HTTP compression is not recommended.
Regardless on whether or not you elect to leverage HTTP compression the important takeaway from this conversation is that SharePoint Products and Technologies performance can be improved beyond the native concepts available to the platform such as Site Output and BLOB Caching which I am planning separate posts to provide prescriptive guidance on implementation.
| Bill Baer |
More like this...
- Search Scale and Resiliency Improvements in SharePoint Server 2016 IT Preview
- Navigating List View Thresholds in SharePoint Server 2016 IT Preview
- Quick Steps to Diagnose Performance Issues in SharePoint 2010
- sharepoint.microsoft.com Optimization Strategy and Insights on the SharePoint Team Blog
- Planning a 100,000+ My Site personal site deployment? Notes...