Comment on Drupal Boost & APC

Drupal Boost & APC

Drupal Boost & APC

I was testing a couple of caching software to stablize the site. Wopular used to crash 3-8 times a day. I had thought the main culprit was mysql because whenever resources become low, there is a logjam of queries waiting to be processed. They eventually pile up and consume all available resources and crash the site. Since I was able to set the server to reboot whenever it's near the melting point I didn't mind it too much because it only takes about 2-5 minutes. The only problem is once in a while a database table would get corrupted, causing the site to either spew out a bunch of error messages or become unviewable. When it happens while I'm sleeping, the site would be unusable until I wake up in the morning.

That's when I actively searched for a solution. I read about a Drupal module called Boost, which converts dynamic pages into static html pages and caches them on the server until they're are updated. Static html pages load up a lot faster and consume less server resources because they don't have to retrieve data from the database after the initial run. I installed it, and as advertised, pages load up significantly faster. For an additional boost in speed, I thought I would also installed APC (Alternative PHP Cache), which caches php scripts. I didn't think APC will improve the site's performance too much, but every little bit helps. I checked my CPU and memory usage and saw a significant reduction - from 60% to just 15%. Great! I'll let it run for a week and if it's stable, I might downgrade my hosting package and save some money.

After a couple days, there was no crashes at all. But, and it's a big but, my cached pages weren't updating. That's why you probably didn't see much updates on Monday and Tuesday. So what a bummer. I had to uninstall Boost. I was bummed out for a little bit and started searching for another similiar module. Unfortunately, none exist. My initial excitement was short-lived. I checked my CPU and memory usage stats - and to my surprise, it didn't change much. It was still using only about 15% of system resources. It was APC all along that gave me the performance improvements. The site hasn't crashed at all for the past four days. Pages did load up faster with Boost, but I was more concerned with server stability to begin with.

So yeah, if your site uses php, and you're experiencing performance problems, install APC. Google it. After a couple more days of stability, it's time to contact my ISP and save a couple dollars on hosting fees.

 

Comment On This Story