Facebook's alternative PHP engine attracts Web service providers

HHVM is being used by the Box storage service and by one of the largest hosts for enterprise-ready WordPress

Some fairly large Internet services are pressing into production Facebook's open-source PHP runtime engine after being impressed with the performance metrics for the alternative to the ubiquitous open-source PHP package used across the Web.

WordPress hosting site WP Engine has found that the Facebook HipHip Virtual Machine (HHVM) executes PHP commands 5.6 times faster than a standard PHP interpreter.

"PHP, compared to HHVM, is wicked slow," said Tomas Puig, WP Engine's director of labs. "So I saw an opportunity for us to use HHVM to drive WordPress."

Enterprise-focused cloud storage provider Box is also using the technology and has been pleased by the results -- average request latency dropped by a factor of three when using HHVM.

"The performance gains we're seeing with HHVM exceeded all expectations," wrote Box engineer Joseph Marrama, in a blog post announcing Box's use of HHVM. "Almost every request that touches Box goes through our PHP codebase, so the speed increase is felt almost everywhere."

Facebook engineers created HHVM as a way to speed the social networking service, which was written largely in the PHP Web development language. Facebook found that many programmers were versatile with the open-source language, which was created in 1994 and is one of the most widely used languages on the Internet.

For Facebook, however, PHP's performance left something to be desired. PHP itself translates the programmer code to machine code only when it is called by the user, which slows performance. So company engineers created a virtual machine that, like the Java Virtual Machine, would translate the code into machine-readable bytecode just before running it. If the code needed to be used again, a bytecode-ready version would be available in the cache ready to go.

HHVM now powers much of Facebook, with other Web companies starting to use it as well.

WP Engine is one of the largest providers of WordPress hosted services for enterprises. Built on PHP, the open-source WordPress content management platform is increasingly being used for powering rich Internet applications, such as providing the back end for mobile apps and cloud services.

WP Engine recently built its next-generation platform, called Mercury, for running WordPress on HHVM. The company found that Mercury had a 560 percent faster response time than the traditional PHP setup. The company is currently testing the platform, which is also running the site for Web consultancy firm 10up in full production mode.

Box already has HHVM running in production mode to power its core Web storage application, which is used by over 27 million people.

The company first looked at HHVM a couple of years ago, but found it would require too much work porting its code to HHVM. The development team behind HHVM, however, has since made it a priority to offer full compatibility with PHP, which swayed Box to use the technology.

Box did run into some transition challenges. One was the migration from the Apache Web server, which provided an PHP interpreter. HHVM runs an internal copy of the high- performance Nginx Web server instead. The Box engineering team also found a number of bugs in HHVM and sent fixes to the HHVM development team.

Because it is a just-in-time compiler, HHVM requires the code to be called a few times before the performance improvements kick in, to "warm up" the cache with material ready to be served, which was something else Box engineers had to get used to. Box changed internal operations to allow for a brief warm-up time before a new instance of HHVM goes live.

Puig agreed that moving to HHVM requires some up-front work.

"Supporting it from an infrastructure perspective is much better than loading a bunch of servers on a virtual machine with cPanel," Puig said, referring to the open-source Web hosting control panel cPanel.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags application developmentLanguages and standardsdevelopment platformssoftwarecloud computinginternetFacebook

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Show Comments

Cool Tech

Breitling Superocean Heritage Chronographe 44

Learn more >

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

David Coyle

Brother PocketJet PJ-773 A4 Portable Thermal Printer

I rate the printer as a 5 out of 5 stars as it has been able to fit seamlessly into my busy and mobile lifestyle.

Kurt Hegetschweiler

Brother PocketJet PJ-773 A4 Portable Thermal Printer

It’s perfect for mobile workers. Just take it out — it’s small enough to sit anywhere — turn it on, load a sheet of paper, and start printing.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?