Introduction: HHVM vs. PHP 7 for Drupal 8 Web Hosting
This Tutorial will show how to install HHVM on a VPS hosting plan to run Drupal 8 with the Facebook just-in-time compiler for better PHP performance & page load speeds.
Hip Hop Virtual Machine (HHVM) functions as a drop-in runtime engine or PHP compiler thathostinghh replaces the Zend Engine in PHP 5/7 versions on a Linux web server.
Current benchmarks suggest that HHVM is faster than PHP 5.6 but slower than PHP 7.x by around 20% on Drupal 8 websites, where publishers need to benchmark performance standards for hardware optimization in support of high traffic requirements.
Step One: Benchmark the PHP 7 Performance on Drupal 8
The general rationale for HHVM adoption has changed in 2017-18 after the launch of PHP 7.x & the introduction of an alternative engine for PHP 5.x web applications.
Because of these improvements, many professional Drupal 8 developers claim that PHP 7 results in around 20% faster web server speeds vs. HHVM in production.
Drupal 8 web publishers & systems administrators can install HHVM on the web server hardware, utilizing professional benchmark tests to assay performance vs. PHP 7.
IMPORTANT UPDATES TO THE HHVM PROJECT:
- 2017: WordPress announced that it would no longer be supporting compatibility with HHVM & encouraged use of PHP 7.
- 2018:The HHVM project announced that it would be pivoting to become a runtime engine for the Hack language and abandon PHP support.
In 2019, it is NOT advised for Drupal 8 website owners to host websites using HHVM unless there is required support for PHP 5.6 on legacy architecture that cannot be upgraded (in which case the platform is effectively redundant & abandoned).
HHVM v3.30 will be the last release series where HHVM aims to support PHP. The key dates are: 2018-12-03: branch cut: expect PHP code tostop working withmasterand nightly builds after this date 2018-12-17: expected releasedatefor v3.30.0 2019-01-28: expected releasedatefor v4.0.0, without PHP support 2019-11-19: expected endof support for v3.30 Ultimately, we recommend that projects either migrate entirely to the Hack language, or entirely to PHP7 and the PHP runtime. We expect support forreal-world PHP code to break rapidly... this will require that any dependencies written in PHP are either forked and migrated to Hack, or migrated away from.
In summary, because PHP 7.x benchmarks at faster web server page load speed processing than HHVM and the entire HHVM platform development is migrating to Hack programming language runtime support by Facebook – ALL Drupal 8 websites running on HHVM need to be migrated away from the platform by 1/28/2019 or risk using outdated & insecure code on production websites.
Step Two: Install HHVM on the VPS or Dedicated Server
HostAdvice has an excellent tutorial available for programmers & developers who need to install HHVM on an Ubuntu Linux web server:
Using Sudo, the main commands required to install the HHVM package are:
apt-getupdate apt-get install software-properties-common apt-transport-https apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:800xB4112585D386EB94 add-apt-repository https://dl.hhvm.com/ubuntu apt-getupdate apt-get install hhvm
These commands can be used to install HHVM on an Ubuntu web server for testing or benchmarking a Drupal 8 website for web server hardware performance & compatibility.
Step Three: HHVM as Premium Upgrade on Shared Plans
Many web hosting companies such as Kinsta & Siteground that previously offered HHVM as a premium upgrade on shared Linux or cloud hosting plans no longer offer the service, requiring the migration of Drupal 8 websites to PHP 7.2 for best results.
Since HHVM functions as a drop-in alternative runtime engine for PHP, Drupal 8 websites running the framework can seamlessly move to PHP 7.2 server settings.
Step Four: Benchmark the Drupal 8 Performance on HHVM
Where Kinsta’s benchmark tests are presented as definitive for HHVM speeds vs. PHP 7 & PHP 5.6, Jeff Geerling has published similar results for Drupal 8 installations:
These tests also show that Drupal 8 performs better on web servers with PHP 7.x & Opcache installed. Zend Opcache is a PHP accelerator that ships with the package.
The HHVM benchmark tests for Drupal & WordPress show that the framework was useful for providing better web server speeds than PHP 5.6 but fails to surpass PHP 7.
After 2019, HHVM will be a Hack runtime engine and abandon PHP language support. HHVM should no longer be considered as an option for Drupal 8 web hosting.
Step Five: Compare Apache to NGINX + Varnish & Redis
HHVM was previously implemented (2012-2018) as a high-performance option for Drupal 7/8 web hosting with Apache servers running Varnish Cache & Redis.
Many high-traffic Drupal & WordPress websites migrated from Apache to NGINX web servers while running HHVM for a PHP performance boost over Zend Engine.
After the release of PHP 7, HHVM has become irrelevant and is discontinuing PHP support completely to become a Facebook Hack language runtime engine.
Drupal web publishers still running HHVM in production with NGINX, Redis, & Varnish Cache need to migrate their configurations back to PHP 7.x by the end on 2018.
Conclusion: (UPDATE) HHVM End of Life 2019 Notice
All Drupal 7 & 8 website publishers still using HHVM in production for web hosting support are advised to migrate back to PHP 7.2 before the end of 2018 or Jan. 2019.
HHVM will end support for PHP and become a Hack language runtime engine with development continued by Facebook on open source foundations (press release).
HHVM had a valuable run when PHP 5.6 was outdated but the new PHP 7.x platform outperforms by over 100% in web server performance speed, making HHVM redundant.
- You can discover new info about Best website hosting by clicking this link.