iSpot performance optimization
Tuesday, May 25th, 2010After the site’s poor performance when it was mentioned on Springwatch I spent a large amount of last week trying to track down the reasons behind it and to rectify them. The problems seemed to stem from connecting to the database server. This in turn was the result of two things combined, the configuration of the database server and a few specific tables in the database being slow to return results.
The actions I’ve taken so far to resolve these issues on the database are:
- using a different configuration of the database server which is tailored to more powerful servers.
- setting up a memory limit for the database query cache to allow this cache to start to be used.
- examining the slow tables in the database and adding indexes where needed to improve their response times.
- upping the maximum connections that the database allows to it by a factor of 10.
On the website side of things I’ve done the following:
- implemented caching where possible using Drupal’s caching mechanisms.
- changed the way Drupal connects to the database server to make use of persistent connections in PHP.
- making sure PHP’s maximum connections to the db reflect those allowed.
With these measures in place the site seems to be responding quicker and I am very confident that the site is much more able to handle increased load, the question is how much?
The next steps are for me to set up profiling on the site so we can start to get an idea of any issues that have yet to be addressed and then in the coming months to arrange load testing to see just how much the site can handle. This will need to be scheduled in to make sure it’s carried out with the lowest impact on users and course students for all courses reliant on the web server.