Menu
Facebook's alternative PHP engine attracts Web service providers

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.

Follow Us

Join the New Zealand Reseller News newsletter!

Error: Please check your email address.

Tags application developmentLanguages and standardsdevelopment platformssoftwarecloud computinginternetFacebook

Slideshows

Top 50 defining moments of the New Zealand channel in 2016

Top 50 defining moments of the New Zealand channel in 2016

Reseller News looks back on a tumultuous 12 months for the New Zealand channel, assessing the fallout from a year of sizeable industry change. Whether it be local or global mergers and acquisitions, distribution deals or job changes, the channel that started the year differs somewhat to the one set to finish it - Reseller News assesses the key moments that made 2016.​

Top 50 defining moments of the New Zealand channel in 2016
​Hewlett Packard Enterprise honours high achieving NZ channel

​Hewlett Packard Enterprise honours high achieving NZ channel

Hewlett Packard Enterprise honoured its top performing Kiwi partners at the second running of its HPE Partner Awards in New Zealand, held at a glitzy ceremony in Auckland. Recognising excellence across eight categories - from distributors to resellers - the tech giant celebrated its first year as a standalone company, following its official split from HP in 2015.

​Hewlett Packard Enterprise honours high achieving NZ channel
Nutanix treats channel partners to Christmas cruise

Nutanix treats channel partners to Christmas cruise

Nutanix recently took to the seas for a Christmas Cruise around Sydney Harbour with its Australia and New Zealand staff, customers and partners to celebrate a stellar year for the vendor. With the sun out, they were all smiles and mingled over drinks and food.

Nutanix treats channel partners to Christmas cruise
Show Comments