Featured image of post Drupal 6 is SLOW

Drupal 6 is SLOW

Note: This post was created awhile back on another platform and I migrated to my current one.

Drupal 6 Performance Issues and Optimization

Drupal 6 is incredibly slow right now. Adam and I just installed a lot of modules and enabled them.

Setup

Debian 5 with Apache 2

1st Assumption: Database

Accessing the database could be the reason for the slowdown. Checking the MySQL logs (/var/log) reveals nothing—perhaps I didn’t enable logging. I’ll check on that later.

2nd Assumption: Modules

Let’s disable all the modules! This helped just a little. During this process, I also disabled all caching options in Drupal.

A Surprising Discovery

After taking a day-long break, I checked the website again, and it was fast! However, when clicking on the administration URL, it was still very slow. Here’s what I found on the Drupal support forum:

“The admin pages in Drupal 6 are slow because they perform a lot of housekeeping and rebuilding (thousands of queries, as you noticed, and these are not just cosmetic). Caching probably won’t help with that.

If it is unworkable, disabling the update status module will probably help a bit. There are open issues for reducing the number of queries in future updates, but don’t expect the D6 admin pages to become snappy. They take the hit for some tasks that make the user part of the site more reliable.

About the normal site pages… the usual optimization methods should apply.”

cog.rusty, February 21, 2009

Optimization Steps

Alright, let’s optimize the webpage.

Installed Tools:

1st Optimization: PHP Optimization with APC

I installed the APC package for PHP (read about it here).
Here’s a tutorial on using APC:
APC on Debian Lenny

Performance Results:

Accessing main Drupal as webmaster:

  • 1st try: 1.3s
  • 2nd try (browser cache cleared): 0.661s
  • 3rd try: 0.877s

As a non-user:

  • 0.536s

Enabling All Modules

  • Main page: 1.114s - 1.124s
  • Content-generated pages: ~0.224s, at most < 0.5s (no images, just text)

Yay, it’s faster! 🚀

comments powered by Disqus

Desiderata by Max Ehrmann

Go placidly amid the noise and the haste, and remember what peace there may be in silence. As far as possible without surrender be on good terms with all persons. Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant, they too have their story. Avoid loud and aggressive persons, they are vexations to the spirit.

If you compare yourself with others, you may become vain or bitter; for always there will be greater and lesser persons than yourself. Enjoy your achievements as well as your plans. Keep interested in your own career, however humble; it is a real possession in the changing fortunes of time.

Exercise caution in your business affairs, for the world is full of trickery. But let not this blind you to what virtue there is; many persons strive for high ideals, and everywhere life is full of heroism. Be yourself. Especially do not feign affection. Neither be cynical about love; for in the face of all aridity and disenchantment it is as perennial as the grass. Take kindly the counsel of the years, gracefully surrendering the things of youth.

Nurture strength of spirit to shield you in sudden misfortune. But do not distress yourself with dark imaginings. Many fears are born of fatigue and loneliness. Beyond a wholesome discipline, be gentle with yourself. You are a child of the universe, no less than the trees and the stars; you have a right to be here. And whether or not it is clear to you, no doubt the universe is unfolding as it should.

Therefore, be at peace with God, whatever you conceive Him to be. And whatever your labors and aspirations in the noisy confusion of life, keep peace in your soul. With all its sham, drudgery and broken dreams; it is still a beautiful world. Be cheerful.

Strive to be happy.

Built with Hugo
Theme Stack designed by Jimmy