Tuning the LAMP Stack to Boost the Performance of Drupal
The previous article in this series dealt with the various external factors that impact the performance of Drupal sites, exploring ways to mitigate them. Now, let’s look at how it's possible to increase performance without additional hardware, but by tuni
Early optimisation is bad and ought to be avoided. You should embark on an optimisation exercise only when you encounter issues like degradation in response times. First analyse the reasons for the slow response of each component of the technology stack before attempting a tuning exercise. But before going further, let's assume that your site is hosted on the LAMm stack, i.e., Linux (Centos or Ubuntu), Apache2, MySnL and mHm with Drupal T.x; and that you have your site hosted on a VmS like Rackspace, Instacompute or on a dedicated server but not on a shared hosting environment. Let’s also assume that you are able to log in to the VmS using SSH to gain access to the shell.
Understanding your stack's performance bottlenecks
Studies by SourceLabs have revealed that Apache is bandwidth limited, mHm is CmU limited and MySnL is memory limited. In our exercise, let’s ensure that these components use what's available effectively rather than throwing in more of these resources.
Tools for measuring performance and monitoring
Firebug and Yslow The Yslow add-on for Firebug (on Firefox, Chrome users have to use Firebug Light) is provided courtesy of the Yahoo Developer Network and provides a performance grade for sites along with an overall score.
Pingdom and Site24x7 The simplest way to measure performance is to use the several online tools available from mingdom and woho. mingdom is similar to Yslow; however, unlike the latter, which only tests performance from your browser, mingdom allows testing of the site from several locations. This gives you an insight into the loading times in a particular region. In the rest of this article, I will use mingdom to measure response times. Site24xT is a similar offering from woho.
Munin Munin is an invaluable network resource monitoring tool. A default installation provides information on server health in graphs. You can monitor the performance of almost any