选择 gzip 而不是 deflate 进行 http 压缩是否会对性能造成影响?

发布于 2024-07-07 15:06:23 字数 58 浏览 6 评论 0原文

我们最近将一些站点从 deflate 切换到 gzip,并注意到我们服务器上的 CPU 负载显着增加。

We recently switched some of our sites from deflate to gzip and noticed a significant increase in cpu load on our servers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

匿名。 2024-07-14 15:06:23

您是否可能遇到缓存未命中的情况? 也就是说,压缩内容有时会被缓存压缩,但切换压缩方案会(或至少应该)使该缓存失效,从而导致 CPU 利用率急剧增加。 你尝试过把它切换回来吗?

Is it possible that you are experiencing cache miss? That is, compressed content is sometimes cached compressed but switching compression schemes would (or at least should) invalidate that cache causing dramatically increased cpu utilization. Did you try switching it back?

厌味 2024-07-14 15:06:23

gzip 基本上是通过一些额外的标头进行压缩的。 因此,性能不应受到重大影响。 现在,也许您的 deflate 工具比 gzip 工具更有效。 您使用相同的工具进行两次压缩还是使用两种不同的工具?

gzip is, basically, deflate with some additional headers. So there should not be a significant performance hit. Now, maybe your deflate tool is just more efficient than your gzip tool. Are you using the same tool for both compressions or two different ones?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文