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.