SlideShare a Scribd company logo
How will it effect the future of WordPress?
What are we talking about?
• The middle layer of page processing (PHP)
• How this effects you and your WP development
• WP, PHP, plugins, themes, BuddyPress
• What tools to I need to use HHVM?
Why change PHP?
• PHP processing is slow
• Run time compilation means slow
• Existing op-code caches do an okay job (APC, eAccelerator)
• PHP is loosely type and a ‘scripting language’
• Resulting in poorly coded habits, themes and plugins
• Resulting in less that optimal performance
• Syntax errors fatal crash at runtime
What’s the big deal?
• PHP mainstream has not spent a lot of time
optimizing it’s core, therefore leaving it to become
slow
• PHP-FPM has been the FastCGI PHP processor of
choice
• Along comes HPHPc (HipHop for PHP) interpreter
and compiler created by Facebook (~2009 - 2013)
• Now comes HHVM (HipHop Virtual Machine ~2012)
How is HHVM better?
• JIT - just in time compilation of code to bytecode
• Convert PHP to intermediate byte code then
machine code
• Even faster by enabling RepoAuthoritative mode
• Tools to detect syntax errors ahead of time?
• More strict typed PHP
How do I invoke it?
• Command line: hhvm foo.php
• Webserver, port 80/443
• FastCGI, behind apache/nginx
• Debian packaging: apt-get install hhvm
Where does HHVM fit?
Nginx
Apache/FPM/
FastCGI
Mysql
Memcached
PHP/WP
browser
HHVM
Mysql
Nginx
PHP/WP
Memcached
browser
Why is this important?
• HHVM is faster
• Less time processing PHP means faster websites
• Sites that are not very cacheable become more
performant
By the numbers
0
0.15
0.3
0.45
0.6
WP 1 WP 2 WP 3 WP 4
HHVM FPM
Avgpageloadtime
WP installs
More numbers
0
0.4
0.8
1.2
1.6
1 2 5 8 10 15 20
HHVM FPM Apache
Number concurrent requests
Avgloadtime(secs)
One WP, different PHP processor tests
Even more numbers
0
0.5
1
1.5
2
1 2 5 8 10 15 20
HHVM 14.04 FPM 14.04 Apache 14.04 Apache 12.04
Apache 10.04
One WP, different PHP processor tests
Avgloadtime(secs)
Number concurrent requests
Things that go bump
http://xkcdsw.com/content/img/1218.png
Is there risk?
• HHVM + poorly written WordPress themes/plugins
can be unstable and unpredictable
• Why? HHVM compiler is strict and doesn’t support
all of PHP historical coding practices
• Memory leaks in HHVM
• Faster PHP is good, but if it doesn’t work, that’s bad
Squeeze the performance
• Xhprof - profiling tool
• Convert PHP to Hack - hh_client (typechecker) and
hackificator
• HHVM RepoAuthoritative mode - compile .php files
in a directory to one sqlite3 file
Xhprof & XhGui
Hhvm and wordpress
Hhvm and wordpress
What is WPE doing?
• Labs team investigation and beta with select sites
• Add HHVM to our web stack
• High availability and failover. If/when HHVM fails,
another service does the PHP processing
• Development tools to develop your WP for HHVM
Resources
• hhvm.com
• github.com/facebook/hhvm
• docs.hhvm.com/manual/en/intro.xhprof.php
• github.com/preinheimer/xhprof

github.com/phacility/xhprof
• www.sitepoint.com/the-need-for-speed-profiling-
with-xhprof-and-xhgui/
Son: Dad, cicadas can jump to China.
Dad: Wow, that’s far, how do that do that?
Son: With their legs.
Dad: Oh
Son: And if the moon was China, they could jump to the moon too.
Dad: Well, of course. You think it’ll make it?
Son: If it really wants to, it will.
Inspiration from a 4 yr old

More Related Content

PPTX
How to make your site 5 times faster in 10 minutes
PDF
WordPress Speed & Performance from Pagely's CTO
PPTX
Magento on HHVM. Daniel Sloof
PDF
mod_php vs FastCGI vs FPM vs CLI
PDF
About Caching
PDF
Daniel Sloof: Magento on HHVM
PDF
Scaling php - Intercon php
PPTX
First steps of programming with php
How to make your site 5 times faster in 10 minutes
WordPress Speed & Performance from Pagely's CTO
Magento on HHVM. Daniel Sloof
mod_php vs FastCGI vs FPM vs CLI
About Caching
Daniel Sloof: Magento on HHVM
Scaling php - Intercon php
First steps of programming with php

What's hot (20)

PPTX
Wordcamp2009
ODP
Choosing a Web Architecture for Perl
PDF
Meta Refresh 2014
PPT
Ria Applications And PHP
PPTX
Automated Testing with Google Chrome - WebDriver- ChromeDriver
PDF
Automated Web App Performance Testing Using WebDriver
PDF
Use Xdebug to profile PHP
PPTX
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
PDF
Web performance testing with web driver
PPTX
Tutorial sederhana netbeans & xampp
PPT
Gearman and asynchronous processing in PHP applications
PPTX
Functional Programming in PHP
PDF
Khanh-Nguyen - Gearman - distributed process solution
PDF
Gearman: A Job Server made for Scale
PPTX
Less\sass done right in .NET
PPTX
Gearman, Supervisor and PHP - Job Management with Sanity!
PDF
Less and faster – Cache tips for WordPress developers
PDF
Web Development Foundation & Team Collaboration
PDF
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
PPTX
How to Supercharge your PHP Web API
Wordcamp2009
Choosing a Web Architecture for Perl
Meta Refresh 2014
Ria Applications And PHP
Automated Testing with Google Chrome - WebDriver- ChromeDriver
Automated Web App Performance Testing Using WebDriver
Use Xdebug to profile PHP
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Web performance testing with web driver
Tutorial sederhana netbeans & xampp
Gearman and asynchronous processing in PHP applications
Functional Programming in PHP
Khanh-Nguyen - Gearman - distributed process solution
Gearman: A Job Server made for Scale
Less\sass done right in .NET
Gearman, Supervisor and PHP - Job Management with Sanity!
Less and faster – Cache tips for WordPress developers
Web Development Foundation & Team Collaboration
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
How to Supercharge your PHP Web API
Ad

Similar to Hhvm and wordpress (20)

PPTX
HipHop Virtual Machine
PPT
PPTX
Drupal hhvm benchmark
PPTX
From PHP to Hack as a Stack and Back
PPTX
Hacking hhvm
PPTX
Hiphop - PHP
PPTX
2016 03 15_biological_databases_part4
PPT
Hacking with hhvm
PDF
Way of the Future
PDF
What the HACK is HHVM?
ODP
IPC 2013 - High Performance PHP with HipHop
PPTX
HyperDB, MySQL Performance, & Flavors of MySQL
PDF
HHVM - Entre Nesse Ritmo - TDC Florianopolis 2014
KEY
Site Performance - From Pinto to Ferrari
PDF
PDF
Php through the eyes of a hoster confoo
PDF
Site Health Check for WordPress
PPTX
Hack and HHVM
PDF
Scaling with Symfony - PHP UK
PPT
Introduction of PHP And MySql presentation
HipHop Virtual Machine
Drupal hhvm benchmark
From PHP to Hack as a Stack and Back
Hacking hhvm
Hiphop - PHP
2016 03 15_biological_databases_part4
Hacking with hhvm
Way of the Future
What the HACK is HHVM?
IPC 2013 - High Performance PHP with HipHop
HyperDB, MySQL Performance, & Flavors of MySQL
HHVM - Entre Nesse Ritmo - TDC Florianopolis 2014
Site Performance - From Pinto to Ferrari
Php through the eyes of a hoster confoo
Site Health Check for WordPress
Hack and HHVM
Scaling with Symfony - PHP UK
Introduction of PHP And MySql presentation
Ad

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
Teaching material agriculture food technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Modernizing your data center with Dell and AMD
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
MYSQL Presentation for SQL database connectivity
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
CIFDAQ's Market Insight: SEC Turns Pro Crypto
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Monthly Chronicles - July 2025
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Modernizing your data center with Dell and AMD
Diabetes mellitus diagnosis method based random forest with bat algorithm
MYSQL Presentation for SQL database connectivity

Hhvm and wordpress

  • 1. How will it effect the future of WordPress?
  • 2. What are we talking about? • The middle layer of page processing (PHP) • How this effects you and your WP development • WP, PHP, plugins, themes, BuddyPress • What tools to I need to use HHVM?
  • 3. Why change PHP? • PHP processing is slow • Run time compilation means slow • Existing op-code caches do an okay job (APC, eAccelerator) • PHP is loosely type and a ‘scripting language’ • Resulting in poorly coded habits, themes and plugins • Resulting in less that optimal performance • Syntax errors fatal crash at runtime
  • 4. What’s the big deal? • PHP mainstream has not spent a lot of time optimizing it’s core, therefore leaving it to become slow • PHP-FPM has been the FastCGI PHP processor of choice • Along comes HPHPc (HipHop for PHP) interpreter and compiler created by Facebook (~2009 - 2013) • Now comes HHVM (HipHop Virtual Machine ~2012)
  • 5. How is HHVM better? • JIT - just in time compilation of code to bytecode • Convert PHP to intermediate byte code then machine code • Even faster by enabling RepoAuthoritative mode • Tools to detect syntax errors ahead of time? • More strict typed PHP
  • 6. How do I invoke it? • Command line: hhvm foo.php • Webserver, port 80/443 • FastCGI, behind apache/nginx • Debian packaging: apt-get install hhvm
  • 7. Where does HHVM fit? Nginx Apache/FPM/ FastCGI Mysql Memcached PHP/WP browser HHVM Mysql Nginx PHP/WP Memcached browser
  • 8. Why is this important? • HHVM is faster • Less time processing PHP means faster websites • Sites that are not very cacheable become more performant
  • 9. By the numbers 0 0.15 0.3 0.45 0.6 WP 1 WP 2 WP 3 WP 4 HHVM FPM Avgpageloadtime WP installs
  • 10. More numbers 0 0.4 0.8 1.2 1.6 1 2 5 8 10 15 20 HHVM FPM Apache Number concurrent requests Avgloadtime(secs) One WP, different PHP processor tests
  • 11. Even more numbers 0 0.5 1 1.5 2 1 2 5 8 10 15 20 HHVM 14.04 FPM 14.04 Apache 14.04 Apache 12.04 Apache 10.04 One WP, different PHP processor tests Avgloadtime(secs) Number concurrent requests
  • 12. Things that go bump http://xkcdsw.com/content/img/1218.png
  • 13. Is there risk? • HHVM + poorly written WordPress themes/plugins can be unstable and unpredictable • Why? HHVM compiler is strict and doesn’t support all of PHP historical coding practices • Memory leaks in HHVM • Faster PHP is good, but if it doesn’t work, that’s bad
  • 14. Squeeze the performance • Xhprof - profiling tool • Convert PHP to Hack - hh_client (typechecker) and hackificator • HHVM RepoAuthoritative mode - compile .php files in a directory to one sqlite3 file
  • 18. What is WPE doing? • Labs team investigation and beta with select sites • Add HHVM to our web stack • High availability and failover. If/when HHVM fails, another service does the PHP processing • Development tools to develop your WP for HHVM
  • 19. Resources • hhvm.com • github.com/facebook/hhvm • docs.hhvm.com/manual/en/intro.xhprof.php • github.com/preinheimer/xhprof
 github.com/phacility/xhprof • www.sitepoint.com/the-need-for-speed-profiling- with-xhprof-and-xhgui/
  • 20. Son: Dad, cicadas can jump to China. Dad: Wow, that’s far, how do that do that? Son: With their legs. Dad: Oh Son: And if the moon was China, they could jump to the moon too. Dad: Well, of course. You think it’ll make it? Son: If it really wants to, it will. Inspiration from a 4 yr old