Make sure to install php-apc (debian and ubuntu package name) to enable caching of compiled
PHP code. Can make a reasonable difference.
Other PHP opcode caching plugins are available but I find this one the most stable.
On the MySQL side, try and ensure your queries are optimised and that there is a reasonable
query cache for repetitive queries.
Thanks, @trevHCS, that's very helpful.
For MySQL, do you have PHPMyAdmin installed? If not, that's got quite a good analytics
section under the "status" tab on the first page. It helpfully highlights various things in
red which can make a difference such as the aforementioned query cache to things like slow
I've also heard that php-apc can help, as mentioned by ChrisWaddle, but going on what I
understand of it, you'd need to restart Apache each time you make changes to the code else
the old code will be cached. If you're production server and dev server are separate then
this shouldn't generally be an issue however.
Talking of caching, there's also Memcached which can cache MySQL results and is handy if you
have the same queries bringing out the same results (or same subset) over and over. The
improvements will depend on server memory and how many similar results you get back, but it
can help sometimes, eg: for a forum or a blog.
Beyond that - I would keep an eye on the results of "top" and especially the "wa" figure as I
found out recently. That gives you the amount of wait time for I/O, so if your hard disks are
the slow point it'll slow everything regardless of memory etc. Also the "sar" command is
quite good for seeing those stats overtime.