PHP Accelerators
I was working programming a site today and was noticing that it seemed to be taking quite a while (5+ seconds) to generate the page. I’ve been looking at some Apache and PHP optimization and decided that it was time to try a PHP accelerator.
I have previously installed the Zend Accelerator, but never really benchmarked it before. I went to install it and found out that it has been incorporated into the commercial Zend Platform software. Looking quickly at some alternatives, I settled on eAccelerator because it seems to be stable, in active development, and had decent documentation.
It didn’t take too much to install. I just installed the php-devel package from yum, then ran ‘phpize’, ‘configure’, ‘make’, and ‘make install’. Then copied the provided eaccelerator.ini into /etc/php.d/ and restarted Apache.
Based on some really simple and quick benchmarks using ‘ab’, it looks like about a 4x performance improvement overall. Not bad for about a half hour of installing it and making it work.
on December 10th, 2008 at 9:59 am
[...] previously written about how easy and effective eAccelerator is to install. There are very few scenarios where this is not effective. Again, ApacheBenchmark tests easily [...]