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.

Sections:  note from the editor   
Topics:  alternative php cache   apc   boost   computers   cpu   drupal   internet   linux   memory   open source   site updates   
SENH'S LATEST BLOG ENTRIES
  • "Storm The Gates" Mobile Game
    My friends just launched a mobile game called "Storm the Gates"! It's available on both Android and iOS. I'm not much of a gamer, so I didn't know what to do when I started it. But my 9-year-old son turned it on and knew exactly what to do. More
  • "Ip Man 3" Has New Release Date in China and Posters to Prove It
    Over at MoviesWithButter.com, I’ve written two articles regarding “Ip Man 3,” the film that’s holding its own in Asian territories against “Star Wars: The Force Awakens.” If you’re not familiar with Asian cinema,”Ip Man” one of the most popular franchises in that area of the world. More
  • Live-Blogged The Golden Globes at MWB
    Yesterday, I live-blogged The Golden Globes -- for various reasons. First, it gets traffic. Second, I might as well do something useful while watching TV. Lastly, I was looking forward to seeing Ricky Gervais host the event again. Nothing against Tina Fey and Amy Poehler, but he’s my favorite. A google search revealed that the last time I did this for this award show was More
  • Kings vs. Mavs: Ominous Stats, News for Sacramento Before Game
    The preview on NBA.com and the injury report from SactownRoyalty.com don’t look good for the Sacramento Kings going into tonight’s game against the playoff-bound Dallas Mavericks. More
  • What?! Kings Beat Thunder, 116-104
    (Image from the Sacramento Bee. Click here to view more images from the game.) What a win. It was a wild one, especially in the first half. We [Sacramento Kings] were down by 17 in the first quarter. In frustration, I was about to turn off the TV, but the teaml called a timeout. More
SENH'S RELATED BLOG ENTRIES
  • Finally Upgraded Sites to Use New Hardware from Linode Cloud: SSDs, Double RAM, Faster CPUs
    Around April, my VPS provider Linode announced that they’ve just finished a major $45M upgrade to their hardware and network, which means free upgrades for their existing users. The new hardware uses SSD RAID drives and faster CPUs. I hadn’t bothered because Wopular and Movies With Butter have been relatively stable. More
  • Installing APC on Ubuntu 10.4 (Lucid)
    I’m working on a new site using Drupal on a LAMP environment. One of the things I want to install is APC - Alternative PHP Cache - for opcode caching. When I did it with Wopular, I’ve noticed the effects immediately. More
  • Improving MySQL Performance with Query Cache
    In my continued efforts to make the site run faster, I’ve set my sights on query caching on MySQL. I think query caching is turned on by default when you install MySQL. At least for me, I didn’t have to do anything. More
  • Relieving High Server Load by Blocking Search Bots
    Over the years, whenever the site was slow to load up, I always went through the same routine. I checked traffic logs to see if it was due to a sudden increase in traffic. If not, I would look at the mysql slow query log to see if there were slow queries bogging up the database. More
  • Cron Jobs and Feed Updates
    Lately, we’ve been adding more local news feeds to the site. Eventually, I want to have most of the major cities across the U.S. covered. What I had noticed since starting this local news project was that the more feeds we've added to the site, the slower the feeds on the homepage updated. More

 

Comment On This Story