How to Turn on Compression for IIS 6.0

a) First determine if it is necessary for you to have compression turned.
Determining Whether HTTP Compression Will Improve Performance

If your server generates a large volume of dynamic content, consider whether the additional processing cost of HTTP compression is one that you can reasonably afford. If the % Processor Time counter is already 80 percent or higher, enabling HTTP compression is not recommended.

To evaluate how much of your processor is typically being used, follow these steps:
1. Establish a baseline for your processor usage by using System Monitor to log the following counters over several days. If you use Performance Logs and Alerts, you can log the data to a database and then query the data, examining the results in detail.

• Processor% Processor Time. This counter has a total instance and a separate instance for each processor in the system. If your server has more than one processor, you need to watch the individual processors as well as the total to discover any imbalance in the workload.
• Network InterfaceBytes Sent/sec. Counters for the Network Interface performance object display the rate at which bytes are transmitted over a TCP/IP connection by monitoring the counters on the network adapter. For information about additional counters to monitor for this object, see Table 6.8.

2. Enable compression, and continue to log the values for these counters for an extended period — preferably for several days — so you have a good basis for comparison.

Collect a broad sample to determine how compression affects various aspects of performance. Conduct the following tests:

•Enable static compression only, dynamic compressions only, and both.
• Change the list of files that you use for compression testing for both static and dynamic content.
• Vary the compression level. Try this on all content types.

3. Compare the data from monitoring with and without compression, and with different types of compression, different compression levels, and different files

b) If yes, go ahead and download MetaEdit from Microsoft Website

c) Next is to turn on Compression within your IIS, and don’t forget to monitor your CPU.

Here are the tabs for compression found in the IIS Snap-In.
Make sure you tick, “Compress application files” and “Compress Static Files”, as well as setting the temporary directory with proper permissions (for IIS user etc).

d) Once 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
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true
3. To enable static compression, type the following at the command prompt
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true

e) Once done you need to restart IIS to allow the changes to take effect.

f) Next we need to create a Web Service Extension (WSE)
Create a new one WSE and call it “Http compression” for example. Then point it at

g) Upon completion open up MetaEdit (assuming that it is installed)
[NB. Always apply to both “deflate” and “gzip” ]

Now find the location for the Compression options of both “deflate” and “gzip”.
In here edit the HcScriptFileExtensions, and add in any that might be relevant to you.
In my case I added in, aspx and asmx.

–snip snip —
HcDynamicCompressionLevel has a default value of 0. Basically this means at if you did everything else right, the compression for dynamic contact is at the lowest level. The valid range for this is from 0 to 10. I had the opportunity of receiving an internal testing summary from Chris Adams from Microsoft regarding the compression level -vs- CPU usage which showed that the CPU needed for levels 0 – 9 is fairly low but for level 10 it hits the roof. Yet the compression for level 9 is nearly as good as level 10. I write all this to say that I recommend level 9 so make sure to change HcDynamicCompressionLevel to 9. Do this for both deflate and gzip.
–end snip snip —

h) Last STEP, reboot IIS.

i) References:
1. Using Http Compression
2. Enabling Http Compression
3. Using HTTP Compression for Faster Downloads
4. Using the Adsutil.vbs

Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Leave a Reply