Alternative PHP Cache (APC) saves the day

Posted by Mikko at 5 February 2012

Category: BiliBid

During the peak hours of BiliBid last Friday night, I had to heavily monitor our servers since it was the first time that we’re expecting higher than usual loads since I changed the set-up of our servers. From the usual 2.50 to 3.00 on normal days, it spiked to as high as 25.00-level. The server was consuming more RAM than usual that it had to use the swap space (virtual RAM). Fortunately, the server was able to survive the night.

Right after all the auctions, I immediately searched for ways on how to reduce server load and RAM usage. I had to find a solution right away since we’re expecting a much higher load the following night.

The first thing I had in mind was to get another server on the same datacenter, then do a load-balancing between two web servers while maintaining a single database server for data consistency. Obviously, the trade-off would be the cost.

I was about to deploy another server when I read an forum post by someone who share the same problem with me. I read the entire thread and read a suggestion to use the Alternative PHP Cache (APC). The thread starter confirmed that APC lowered down his CPU usage so I thought of giving it a try, too.

Right after installation, I immediately saw a drastic drop on the load. I played with APC’s configuration for some time then  restarted the server to free up some RAM in case I have memory leaks. After the restart, I saw promising figures, increasing my confidence on the server.

Then came Saturday night, the time I was expecting the heaviest load. During the time I had maximum number of requests on the server (even more than the max no of requests on Friday night), the load only played from 1.50 to 2.00, a huge leap from Friday night’s 25.00.

The server has officially survived the heaviest load (in terms of requests) for Saturday night without hiccups and with spare resources for moooore load. Thanks APC for saving the day!

Now, I have more time to optimize my UFC 143 live stream post. Hehehe.

======================================

Related posts:

  1. The art of scaling
  2. Trying to solve an upcoming problem
  3. A Small Orange Rocks
  4. The Geek Brewery is ONLINE plus DreamHost and A Small Orange Promo Code!
  5. Wala na po kayong load!

Leave a Reply

Click here to cancel reply.
Leave a Reply
  • (required)
  • (required) (will not be published)

  • Pages

    • About
    • Contact
    • Privacy Policy
    • Sitemap
  • Categories

    • Android (2)
    • BiliBid (5)
    • Blogging (71)
    • Events (14)
    • Food Trip (6)
    • Gadgets (7)
    • Google (14)
    • How-To (18)
    • Internet (37)
    • Life Hacks (13)
    • Linux (16)
    • Mobile (13)
    • Personal (88)
    • Programming (18)
    • Random (75)
    • RSS- (3)
    • Travel (4)
    • Uncategorized (18)
    • UPCAT Stuff (9)
    • Wordpress Stuff (11)
  • Archives

    • February 2012 (2)
    • November 2011 (1)
    • September 2011 (4)
    • June 2011 (1)
    • February 2011 (1)
    • January 2011 (1)
    • December 2010 (5)
    • November 2010 (1)
    • October 2010 (2)
    • September 2010 (1)
    • August 2010 (1)
    • July 2010 (1)
    • June 2010 (4)
    • May 2010 (5)
    • April 2010 (2)
    • March 2010 (1)
    • February 2010 (3)
    • January 2010 (3)
    • December 2009 (1)
    • November 2009 (2)
    • October 2009 (4)
    • September 2009 (5)
    • August 2009 (6)
    • July 2009 (9)
    • June 2009 (9)
    • May 2009 (8)
    • April 2009 (12)
    • March 2009 (4)
    • February 2009 (5)
    • January 2009 (7)
    • December 2008 (5)
    • November 2008 (3)
    • October 2008 (6)
    • September 2008 (7)
    • August 2008 (16)
    • July 2008 (11)
    • June 2008 (5)
    • May 2008 (20)
    • April 2008 (19)
    • March 2008 (31)
    • February 2008 (17)
    • January 2008 (21)
    • December 2007 (27)
    • November 2007 (23)
    • October 2007 (35)
    • September 2007 (3)
  • Blogroll

    • An Apple A Day
    • BiliBid
    • Jehzlau Concepts
    • JohnCarl.net
    • Kenan Biel
    • Randalism
    • The Techie Filmmaker
    • Tonyo Cruz
    • Waldas
    • Yeah, Drew
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.