I’ve spend much of the past three days making some changes on the badgerherald.com server that have sped up the site enormously. The two big changes were implementing MySQL database caching to prevent redundant database queries, especially from the advertising software we use, and implementing eAccelerator to greatly expedite PHP script processing.
The site has been very slow lately, partly due to the aforementioned setting not being in use, and partly due to web traffic increasing over the past few weeks (This chart won’t pertain any longer once this entry is a few weeks old…):
Before the updates, top reported server load averages of 1.5-2, sometimes much higher. This basically meant people trying to view the site were put in a queue and their pages were not being instantly served. Additionally, the server CPU was consistently in use, averaging more than 90 percent use.
Now I’ve got the load down to an average of 0.1 or less, so content is being served up very quickly, as it should. The MySQL database caching has reduced CPU usage drastically, and we’re now averaging less than 10 percent use. I’m going to continue improving performance around the site once more of it is converted to the new look.