Monday, June 9, 2008

Drupal 5 Performance Tuning, Suprising way

Lately, I tried to tuning up my Drupal 5-based website for one of my company's clients. And successfully achieve their requested test: more than 50 requests per seconds with only one additional PHP PECL module: APC. Alhamdulillah, finally. It was achieved by an unusual way, at least for me.

About 2 months before during development time, I had the Drupal pass the same test. This fact made me relieved that the development is on the track. But at the time, it did not load so much modules as it did lately. To, make it faster, I even activated memcache and advanced session modules. Then, I continued to add and customize additional modules. I think, without testing it anymore.

Two months later, I found out that my Drupal had gone slow. It could only handle no more than 25 requests per seconds. What?..... This made me curious over the new modules. I tried to turn they off one by one and I fired up xcache to see what was happening. After tuning up Apache2, MySQL, and others I could just only rise 2 more request.

I felt something must had gone wrong but not in the Drupal. Because fresh Drupal at the same time also never reached 50 requests per seconds but it had actually before (2 months before). What about removing just (since 2 months before) installed PHP memcache.ini and xcache.ini or renaming it, so that PHP assumes that there is no memcache and xcache.ini

Wonderfully and suprisingly, my Drupal passed the test and reached 52 requests per second. This made me think, sometimes we don't need to go far away to find solutions. The solutions may be near us.

No comments: