Causes of High Server Load
I've recently been informed by my host that my site is causing very high server load, although I don't really know how I can find out what is actually causing it. I tested to make sure and yes, its my site (and my coding).
The speed of the scripts is fine, and I have optimised all of 20 or so mySQL queries to less than 0.001 seconds. I use mod_rewrite quite a lot too, but I don't see how this could cause such a rise in server load.
Is there any way of finding out whether a certain function or operation is causing the high load?
Causes of high server load
Something you should consider when looking at the causes of high server load on shared hosting systems are the following:
Do they use cpanel, webppliance, plesk or some other 'generic' hosting control panel. Many of these tend to run CGI scripts and PHP etc. in the most secure way possible, this means there is a large performance hit for every page visited (see cgiwrap, phpsuexec etc.).
You could suggest to your webhost to install PHP a php bytecode cache (ionCube PHPA, Zend Performance Suite, mmcache etc.), and enable query caching in MySQL (a 5 or 6mb cache should be ok). Although this will decrease the security of all PHP applications running (they'll be required to run using mod_php or via fastcgi), the performance increase will be very noticable.