iis compression a how to

TestShoot

n00b
Joined
Jan 7, 2004
Messages
26
I had not seen this posted yet, so I figured what the heck.


Compressed data save bandwidth and gets to you faster.
This increased my speed on my intranet app by 30%
I went into IIS, and set the compression, and the temp space I was to allow the server to use at 32mb, roughly 1/8th the total ram on the box. I also reg edit'd HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \Inetinfo \Parameters\ MemCacheSize (REG_DWORD) because it is usually set too high. You will probably see 19 or 25, this is ram consumption as I am told, for idle processes. I set it to 8.

To turn on compression for static files go to IIS, right click on your server, go to Properties, click Edit next to the dropdown saying wwwservice, from there select the service tab. Select compress static and apps, and set the radio button to allow 32mb for the max temp folder size.

Now this will compress static items, not the asp, now should you have other content or are foolhearty enough to compress ASP (I am) get a command prompt and do the following:

CD into c:\inetpub\adminscripts
Type:cscript.exe adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html adding "asp" "asa" "gif" "jpg" "swf" "css" "js" or whatever you want to compress. You will probably see some cryptic error, but ignore it. DO NOT TYPE IN MDB, you will have long! lag times, leave the db alone.
Type in next: cscript.exe adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions followed by the extensions you chose to compress. If not, you will get weird garbled text.

Finally type: iissreset.exe /restart that will stop and start IIS with the new policy in effect.

The overall savings in bandwidth transfers is about 15-30% of the original size on a default install of MWP (maxwebportal) and about 30% on Comersus, for examples. That is right, sometimes a 3x speed increase.
 
Back
Top