2 Comments

Summary:

Six months ago, Facebook open-sourced a set of technologies called HipHop for PHP. It was a way to turbocharge PHP. Facebook says it has helped them get faster, it has helped improve php using open-source software that like WordPress, MediaWiki, phpBB and Drupal.

Image (2) early_edition1.png for post 33764

It’s been almost six months since I wrote about Facebook’s attempts to turbocharge PHP ( a web-oriented programming language) using a set of technologies called HipHop for PHP. At that time, Facebook had open-sourced the technology. Just to recap, HipHop for PHP is a sort of converter which takes PHP code and converts it into C++ code and thus creates a binary that can be run on a server natively.

Since then, HipHop has been adopted by a growing number of developers, and Facebook has also roped in the likes of DrupalMediaWikiphpBB and WordPress to get their software running under HipHop. According to Facebook estimates, WordPress has become 2.7 times faster when running under HipHop.

Working with the open source community has come in handy for Facebook, which has seen big contributions from others help HipHop become better and more efficient. HipHop has apparently become 1.8 times faster, which has resulted in big improvements on Facebook itself. In fact, Facebook has entirely replaced Apache and classic PHP with HipHop (which also includes a web server.) 

When I spoke yesterday to Facebook’s open-source advocate Scott MacVicar, he said that thanks to  HipHop, Facebook has seen a 50 percent decline in the CPU usage, a trend that has continued even as Facebook has become bigger and more complex in the past six months. Lower CPU usage means that Facebook needs fewer machines that it normally would have needed. “We want to basically speed up Facebook,”  MacVicar said. And in the process, the web. When I asked Haiping Zhao, senior software engineer at Facebook, how much performance gain can be eked out of HipHop, he quipped, “Even I want to know that.” If there’s anyone who knows HipHop, it is Zhao, who’s been involved with the effort for almost three years now.

In response to my original post, a handful of our readers said that HipHop was essentially a good way for large-scale PHP apps to optimize. Jeff Dickey said it was “going to address the CPU-intensive side of the shared-server pain point. ” Jeffrey McManus said, ”Unfortunately it probably won’t resolve the most common types of Web performance problems — this is the kind of tactic that makes sense for those dozen or so Web companies that are operating at Facebook scale.”

Facebook wants to change that, and it seems the project is getting more traction. The HipHop mailing list has gotten bigger, and now has about 1000 folks signed up for it. Another 67 developers have forked it and are using it to build their own tweaks.  Perhaps this news outlined on Facebook’s developer blog will help attract more independent developers to HipHop:

Hui Chen, a Summer of Code student, has worked to add support for FreeBSD and 32-bit environments. We’ve also added preliminary support for OS X. While we’re not planning to use these platforms at Facebook, they’ll go a long way to getting even more community involvement around the project. For example, there are a number of developers who want to test and develop with HipHop on their 32-bit laptops.

Related content from GigaOM Pro (sub req’d):

Can Facebook or Twitter Spin Off the Next Hadoop?

By Om Malik

You're subscribed! If you like, you can update your settings

Related stories

  1. This is a fantastic technology. I look forward to more major networks and services implementing this. Does anyone know if this will also be useful for smaller scale operations?

    Share
  2. I’m really excited by the HipHop for PHP developments, and awesome insights Om, as usual.

    It might be beneficial to my fellow readers to link:
    “HipHop for PHP: six months later” by Scott MacVicar
    http://www.facebook.com/notes/facebook-engineering/hiphop-for-php-six-months-later/416880943919

    Share

Comments have been disabled for this post