Improving Smart Client Performance using IIS 6 Native Compression

Improving Smart Client Performance using IIS 6 Native Compression

  • Comments 5

In .NET 2.0 the property .EnableDecompression was added which will allow you to use IIS 6 Native Compression in your smart client application. The following article explains how to implement compression in your application and how to configure IIS 6 to support compression of asmx web services.

Step 1:

Configure client side code to allow for compression/decompression. For your client application you must first generate a proxy class that will allow you to connect to your web service. To do this, you can use the wsdl.exe tool and pass in your web service WSDL:

clip_image002

Next, add the proxy class to your project, instantiate your proxy and set the EnableDecompression property to true:

clip_image004

Step 2:

Enable compression on the Web Services IIS server.

1. On the IIS server, open Inetmgr, right click on the web site node and select properties. Click on the Service tab.

2. Under the HTTP compression section, check “Compress application files” and “Compress static files” click Apply – OK.

3. Click on Web Service Extensions.

4. Click “Add a new Web service extension” and add the gzip.dll extension.

Finally - Add the asmx extension to your HcScriptFileExtensions collection by running the following adsutil.vbs statement:

clip_image006

Verify that compression is working by using Fiddler and checking the response body of your web service call. Check the transformer section and look for the HTTP Compression section.

clip_image008

 

Findings:

  • Before compression the data sent over the wire from server <> client is ~14 MB
  • After compression the data sent over the wire from server <> client is 578 KB or < 1 MB.
  • The duration of the call was decreased by roughly half a second. However, the NIC utilization was substantial. Watching Task Manager while testing this I saw 75% NIC utilization for a single request when the data was not compressed. With compression I saw < 5% NIC utilization.
  • Compression is very easy to implement in a smart client. Simply set the EnableDecompression = true property on the client and configure IIS native compression adding the “asmx” to the HCCriptFileExtentions section.

 

For more information see the following:

http://msdn.microsoft.com/en-us/library/system.web.services.protocols.httpwebclientprotocol.enabledecompression.aspx

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true

James Beeson

Performance Technologist

Microsoft – ACE Team

  • PingBack from http://www.easycoded.com/improving-smart-client-performance-using-iis-6-native-compression/

  • James!

    Very cool - thanks for sharing this.

    The result is impressive when applying compression.

    alikl

  • Is there a critical point after which the compression gains would be undermined by the uncompression load on the CPU?

  • That’s a great question Kris, I did see a small CPU increase on the server while load testing this scenario using VSTS, however it was difficult to tie this to compression directly as the throughput of the application doubled.  More testing is required to find the critical point but I would consider adjusting the HCDynamicCompressionLevel down to lower CPU impact if needed.

  • 196 Microsoft Team blogs searched, 97 blogs have new articles in the past 7 days. 218 new articles found...

Page 1 of 1 (5 items)