简体   繁体   English

在IIS7中启用动态压缩是否值得?

[英]Is it worth it to enable dynamic compression in IIS7?

I am trying to find all possible ways I could improve my website performance. 我试图找到所有可能的方法来改善我的网站性能。 I was considering enabling dynamic compression at the server level but was concerned by performance hits (no caching of compressed pages - corruption of files - overhead on the server). 我正在考虑在服务器级别启用动态压缩,但是关注性能命中(没有压缩页面的缓存 - 文件损坏 - 服务器上的开销)。 Should I just give up on the dynamic compression with IIS 7? 我应该放弃使用IIS 7进行动态压缩吗? are there modules out there that do a better job than the built-in compression module? 有哪些模块比内置压缩模块做得更好?

You should almost always enable dynamic compression (static is on by default). 您几乎应该始终启用动态压缩(默认情况下静态打开)。 Dynamic compression == undue processing stress is a pernicious myth. 动态压缩==过度处理压力是一个有害的神话。 Here's MSDN : 这是MSDN

Despite a common myth, dynamic compression usually does not have a prohibitive CPU overhead. 尽管有一个共同的神话,但动态压缩通常不会产生过高的CPU开销。 In fact, dynamic compression often causes less than 5 percent of the total CPU utilization on a busy server. 事实上,动态压缩通常会导致繁忙服务器上CPU利用率不到5%。 Dynamic compression can be deployed somewhat liberally to allow for maximum bandwidth savings for any application workloads. 可以在某种程度上自由地部署动态压缩,以便为任何应用程序工作负载节省最大带宽。

Also, you can specify a CPU throttle for compression in IIS7. 此外,您可以在IIS7中为压缩指定CPU限制。

You should absolutely enable dynamic compression. 您绝对应该启用动态压缩。 See this article on the top 10 Performance improvements in IIS 7. 有关IIS 7中的前10个性能改进,请参阅此文章

Quoting from the article: 引用文章:

Bandwidth Reduction from Compression 压缩带宽减少

It comes as no surprise that bandwidth costs are one of the top costs of running an Internet-facing datacenter. 毫不奇怪,带宽成本是运行面向Internet的数据中心的最高成本之一。 In addition, the bandwidth required to deliver requested content is a key factor in the perceived responsiveness of your application. 此外,提供所请求内容所需的带宽是应用程序感知响应性的关键因素。

One of the most effective ways to reduce the bandwidth needed to deliver the application responses is to use HTTP compression. 减少传递应用程序响应所需带宽的最有效方法之一是使用HTTP压缩。 This can reduce the size of the response by a substantial amount, often by a factor of 10 when applied to easily compressible text content such as HTML. 当应用于诸如HTML的易于压缩的文本内容时,这可以将响应的大小减小相当大的量,通常为10倍。 The best part is that virtually all desktop browsers support it, and decompression costs on desktop hardware are minor compared to the latency savings from sending less data. 最好的部分是几乎所有桌面浏览器都支持它,而桌面硬件上的解压缩成本与发送较少数据所带来的延迟相比是微不足道的。 And since compression is based on Content-Encoding negotiation defined in the HTTP 1.1 protocol, enabling it is safe for clients that do not support compression—these clients simply receive an uncompressed version of the content. 由于压缩基于HTTP 1.1协议中定义的内容编码协商,因此对于不支持压缩的客户端启用它是安全的 - 这些客户端只需接收内容的未压缩版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM