views:

97

answers:

2

For instance, with a level of IIS compression set to 9, the web browsing is significantly faster. However, I also have a Web Services application on the box, which transfers significant amounts of data (e.g. 3MB payload is typical), it actually takes 20-30% longer for the data to get to the client, because the CPU on the server takes a while to compress it.

Is there a rule of thumb for the level of IIS compression vs amount of data transfered?

Anecdotal experience is welcome as well.

A: 

Doubtful, because there are so many variables:

  • client/server connection speed
  • CPU speed and workload
  • Type of data (entropy)
  • ...

I expect the connection is fairly speedy in your use case? Compressing 3MB shouldn't take all that long after all.

Thorarin
A: 

Ok, I ran some benchmarks and no matter how you slice it, turning off compression results in faster performance for my use case. Here are the result for a web service call that returns 3.2 megabytes of data (mostly list of things deserialized into byte arrays)

Compression  Bandwidth  Time
Level       (KB)       (seconds)
9     1,174    4.2
8     1,174    2.2
7     1,172    1.625
6     1,174      1.5
5     1,181    1.39
4     1,213    1.344
3     1,441    1.375
2     1,490    1.344
1     1,548    1.312
0     1,554    1.312

No         3,226   1.266
Compression

The CPU is pretty pegged at level 9 for the duration of the web service call, not so bad at level 8 and anything beneath that is in single digits utilization.

AngryHacker