More ways to make Drupal run faster

Over the weekend I implemented a few more changes that have resulted in the site running even faster. For someone that knows what they are doing these changes would have been easy and would probably take no more than 10 minutes.. For me they took a few days. I’m still new to Linux and Apache so for me this is all about learning – AND making my Drupal run faster.

Note: Even though GrownUpGeek.com runs on Drupal, both of these tips can be applied to any site that runs on MySQL or Apache.

I’ve read a-million times that optimizing your MySQL database is important to get your Drupal site running fast. In the past I’ve posted some of my tips to maintain MySQL on Drupal, but these were only basic maintenance items. What I did this weekend was actually optimize the MySQL configuration to run better on my particular server and configuration. Now keep in mind, this is the most basic and simple way of configuring and tuning MySQL, so if you are an expert, you may as well move along now.

Optimzing MySQL with the MySQL Performance Tuning Primer: I stumbled across this little script while researching how to optimize MySQL for Drupal. When run on the server the Tuning-Primer script examines your my.conf variables and makes suggests for changes. Installing the script was simple: Just copy it into /etc then run it from the shell. The first time I ran the script it pointed out that my settings were way out of whack. After 3 days of adjusting the settings (the script recommends waiting 48 hours between changes) I can now see a noticeable improvement in performance. Making the suggested changes were easy. Just modify the variables in \etc\my.cnf

Decreasing page load-times by enabling on-the-fly-compression:
This change will help visitors on slow connections more than anything else, but it will also help lower overall bandwidth usage so it’s still worth it. By enabling MOD_DEFLATE (or MOD_GZIP for those of us not yet on Apache 2.0) webpages will be automatically compressed before being sent over the internet and then automatically UNcompressed by the visitors browser. Virtually all modern browsers support this dynamic compression and the entire process is transparent to the visitor. Although the documentation to enable MOD_DEFLATE (or MOD_GZIP) seems simple enough, I left this one up to my host. Once enabled your pages will be compressed up to 75% – resulting in noticeably faster load times for visitors on slow connections.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>