apache - 压缩还是不压缩?

标签 apache compression gzip deflate content-encoding

在 Apache 服务器中启用压缩 (gzip/deflate) 将减少响应的大小,但会增加更多的 CPU 周期,我将使用各种响应大小运行压力测试,但 我想问一下,就服务器负载而言,是否有关于何时应该打开或关闭压缩的建议?

谢谢

最佳答案

在大多数情况下,Web 服务器受到 io(内存、网络带宽、数据库、硬盘驱动器等)的限制,并且有足够的空闲 cpu 周期可用于在提供页面之前压缩页面,特别是因为甚至不是真正的 CPU 密集型,同时它为您的用户提供了巨大的可用性提升并节省了带宽。

关于apache - 压缩还是不压缩?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9490135/

相关文章:

julia - 在 Julia 中使用 Arrow.jl 进行数据压缩

powershell - 从脚本位置 powershell 创建 zip

python - 内容编码 : gzip + Transfer-Encoding: chunked with gzip/zlib gives incorrect header check

Android读写临时文件

python - 如何在python中提取gz文件

c++ - boost gzip 解压缩字节数组

python - Apache 运行静态内容和 Flask 应用程序

apache - 如何在 Ant build.xml 文件中包含外部库?

php - 从 URL Laravel 5 中删除 index.php

apache - 如果出现 404,则 Apache 不提供 CORS header