使用CPU时间平衡IIS压缩?

时间:2022-06-24 03:30:19

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.

例如,将IIS压缩级别设置为9,Web浏览速度明显加快。但是,我还在盒子上有一个Web服务应用程序,它传输大量数据(例如典型的3MB有效载荷),实际上数据传输到客户端的时间要长20-30%,因为服务器上的CPU需要一段时间来压缩它。

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

对于IIS压缩级别和传输的数据量,是否有经验法则?

Anecdotal experience is welcome as well.

轶事经验也很受欢迎。

2 个解决方案

#1


Doubtful, because there are so many variables:

令人怀疑,因为有很多变数:

  • client/server connection speed
  • 客户端/服务器连接速度

  • CPU speed and workload
  • CPU速度和工作量

  • 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.

我希望你的用例连接速度相当快?压缩3MB毕竟不应该花那么长时间。

#2


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)

好吧,我运行了一些基准测试,无论你如何切片,关闭压缩效果都可以提高我的用例性能。以下是Web服务调用的结果,该调用返回3.2兆字节的数据(主要是反序列化为字节数组的事物列表)

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.

在Web服务调用期间,CPU非常固定在第9级,而在第8级则不是很糟糕,而且其下方的任何内容都是单位数利用率。

#1


Doubtful, because there are so many variables:

令人怀疑,因为有很多变数:

  • client/server connection speed
  • 客户端/服务器连接速度

  • CPU speed and workload
  • CPU速度和工作量

  • 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.

我希望你的用例连接速度相当快?压缩3MB毕竟不应该花那么长时间。

#2


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)

好吧,我运行了一些基准测试,无论你如何切片,关闭压缩效果都可以提高我的用例性能。以下是Web服务调用的结果,该调用返回3.2兆字节的数据(主要是反序列化为字节数组的事物列表)

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.

在Web服务调用期间,CPU非常固定在第9级,而在第8级则不是很糟糕,而且其下方的任何内容都是单位数利用率。