Stay on Top of Enterprise Technology Trends
Get updates impacting your industry from our GigaOm Research Community
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 Drupal, MediaWiki, phpBB 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):