The APC cache can significantly improve your PHP script performance, just by installing it, which basically takes 5 minutes! (Plus, it’s actually supported by the core PHP developers and will probably be integrated into PHP6…) Here’s what I did on my Debian Lenny box… First you may want to have a reference benchmark to see if it actually improves: Code:
ab -c5 -n100 http://www.yoursite.com/yourscript.php
Now install the APC package: Code:
aptitude install php-apc
Now, restart apache: Code:
Now, you can run your benchmark again and see the difference! Tada!
Follow up: APC comes with a control panel script, that allows you to check cache usage. Here’s how to make it available on your web root (for example):Code:
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of the TheUnical Technologies.