phpoptimizationgzipmod-deflateeaccelerator

Eaccelerator with mod_deflate or gzip


First. Which differences between mod_Deflate and gzip, which is better ? And can i use Eaccelerator + mod_deflate together.


Solution

  • You can use eAccelerator and mod_deflate simultaneously. 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. mod_deflate compresses the output from apache (rendered php or other files) to reduce the amount of traffic passing over the network. 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); 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.

    The main problem with eAccelerator is that it appears to be unsupported. There have been no updates since 2010 and it will not compile under php 5.4. XCache appears to work well with php 5.4.4 on FreeBSD.