简体   繁体   English

带有mod_deflate或gzip的加速器

[英]Eaccelerator with mod_deflate or gzip

First. 第一。 Which differences between mod_Deflate and gzip, which is better ? mod_Deflate和gzip之间有哪些区别,哪个更好? And can i use Eaccelerator + mod_deflate together. 我可以一起使用Eaccelerator + mod_deflate吗?

You can use eAccelerator and mod_deflate simultaneously. 您可以同时使用eAccelerator和mod_deflate。 They work in different areas of the response process. 他们在响应过程的不同领域工作。 eAccelerator works by caching partial interpretation of your php so that, in theory, it takes less CPU to render the same php a second time. eAccelerator的工作原理是缓存php的部分解释,因此从理论上讲,第二次渲染同一php所需的CPU更少。 mod_deflate compresses the output from apache (rendered php or other files) to reduce the amount of traffic passing over the network. mod_deflate压缩来自apache(渲染的php或其他文件)的输出,以减少通过网络的通信量。 So the first is intended to help the results leave your server faster and the second is intended to help those results travel from the server to the client faster. 因此,第一个目的是帮助结果更快地离开服务器,第二个目的是帮助那些结果更快地从服务器传递到客户端。

Obviously the compression costs CPU (at both ends); 显然,压缩会消耗CPU(两端); so there's a trade off that may or may not be beneficial for you depending on whether you have extra CPU or extra bandwidth. 因此,根据您是否拥有额外的CPU或额外的带宽,需要权衡取舍是否对您有利。

The main problem with eAccelerator is that it appears to be unsupported. eAccelerator的主要问题在于它似乎不受支持。 There have been no updates since 2010 and it will not compile under php 5.4. 自2010年以来没有更新,它将无法在php 5.4下编译。 XCache appears to work well with php 5.4.4 on FreeBSD. XCache似乎与FreeBSD上的PHP 5.4.4兼容。

As such no comparision, both are intended to do the same task. 因此,无法进行比较,因此两者都打算完成相同的任务。 gzip was supported in old version of apache1.3 and mod_deflate is supported in apache2.0 and further. apache1.3的旧版本支持gzip,而apache2.0及更高版本则支持mod_deflate。

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

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