Deane and I have been playing with eZPublish a lot lately, and while I enjoy eZPublish’s great API, and the ability to quickly crank out a content-managed website, I dislike the idea of all the server gymnastics required just to bring up a home page. eZPublish gets around a lot of the heavy lifting with judicious use of caching, but even then, there’s a lot of PHP to be interpreted in order to get the job done. And that PHP gets interpreted every freaking time the page loads.
I installed the Turck MMCache PHP accelerator on the server this afternoon. Here’s the lowdown:
Turck MMCache is a free open source PHP accelerator, optimizer, encoder and dynamic content cache for PHP. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. Also it uses some optimizations to speed up execution of PHP scripts. Turck MMCache typically reduces server load and increases the speed of your PHP code by 1-10 times.
It makes a big difference. First of all, all the code is now running from a compiled state. In the case of eZPublish, most of its caching strategy is just to read template files and write them as PHP includes. With MMCache, now that’s being compiled too. Smarty uses the same strategy, so any Smarty-based apps would get this double benefit as well.
Thanks to Gentoo, installation was a no-brainer:
$> emerge turck-mmcache $> etc-update $> apachectl restart
Bingo. (They of course have install docs for those with other systems).