SlideShare a Scribd company logo
1 of 20
Download to read offline
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
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

What's hot

Wordcamp2009
Wordcamp2009Wordcamp2009
Wordcamp2009joetek
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for PerlPerrin Harkins
 
Ria Applications And PHP
Ria Applications And PHPRia Applications And PHP
Ria Applications And PHPJohn Coggeshall
 
Automated Testing with Google Chrome - WebDriver- ChromeDriver
Automated Testing with Google Chrome - WebDriver- ChromeDriverAutomated Testing with Google Chrome - WebDriver- ChromeDriver
Automated Testing with Google Chrome - WebDriver- ChromeDriverManoj Kumar Kumar
 
Automated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverAutomated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverseleniumconf
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHPSeravo
 
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVMPerformance Comparison of PHP 5.6 vs. 7.0 vs HHVM
Performance Comparison of PHP 5.6 vs. 7.0 vs HHVMJani Tarvainen
 
Web performance testing with web driver
Web performance testing with web driverWeb performance testing with web driver
Web performance testing with web driverMichael Klepikov
 
Tutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppTutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppLailani Fitria
 
Gearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applicationsGearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applicationsDinh Pham
 
Functional Programming in PHP
Functional Programming in PHPFunctional Programming in PHP
Functional Programming in PHPAurimas Niekis
 
Khanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionKhanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionJavaScript Meetup HCMC
 
Gearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleGearman: A Job Server made for Scale
Gearman: A Job Server made for ScaleMike Willbanks
 
Less\sass done right in .NET
Less\sass done right in .NETLess\sass done right in .NET
Less\sass done right in .NETPawelPabich
 
Gearman, Supervisor and PHP - Job Management with Sanity!
Gearman, Supervisor and PHP - Job Management with Sanity!Gearman, Supervisor and PHP - Job Management with Sanity!
Gearman, Supervisor and PHP - Job Management with Sanity!Abu Ashraf Masnun
 
Less and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersLess and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersSeravo
 
Web Development Foundation & Team Collaboration
Web Development Foundation & Team CollaborationWeb Development Foundation & Team Collaboration
Web Development Foundation & Team CollaborationSupanat Potiwarakorn
 
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...
Imagine 2014: The Devil is in the Details How to Optimize Magento Hosting to ...George White
 
How to Supercharge your PHP Web API
How to Supercharge your PHP Web APIHow to Supercharge your PHP Web API
How to Supercharge your PHP Web APIAurimas Niekis
 

What's hot (20)

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

Similar to Hhvm and wordpress

2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida realPHP Conference Argentina
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHPJonathan Klein
 
How Swoole Blows Up your Mind about PHP?
How Swoole Blows Up your Mind about PHP?How Swoole Blows Up your Mind about PHP?
How Swoole Blows Up your Mind about PHP?Albert Chen
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)Nexcess.net LLC
 
Putting Compilers to Work
Putting Compilers to WorkPutting Compilers to Work
Putting Compilers to WorkSingleStore
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opmisnull
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptxMarianJRuben
 
A look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architectureA look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architectureAimee Maree Forsstrom
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UKRicard Clau
 
From PHP to Hack as a Stack and Back
From PHP to Hack as a Stack and BackFrom PHP to Hack as a Stack and Back
From PHP to Hack as a Stack and BackTimothy Chandler
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar litbbsr
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar litbbsr
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architectureElizabeth Smith
 
Php hypertext Preprocessor
Php hypertext PreprocessorPhp hypertext Preprocessor
Php hypertext PreprocessorMrsRLakshmiIT
 
Phalcon Framework: San Antonio Web Developers Group
Phalcon Framework: San Antonio Web Developers Group Phalcon Framework: San Antonio Web Developers Group
Phalcon Framework: San Antonio Web Developers Group jdfreeman11
 

Similar to Hhvm and wordpress (20)

2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real2013 - Dustin whittle - Escalando PHP en la vida real
2013 - Dustin whittle - Escalando PHP en la vida real
 
Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
 
How Swoole Blows Up your Mind about PHP?
How Swoole Blows Up your Mind about PHP?How Swoole Blows Up your Mind about PHP?
How Swoole Blows Up your Mind about PHP?
 
Hhvm vs php
Hhvm vs phpHhvm vs php
Hhvm vs php
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
 
Putting Compilers to Work
Putting Compilers to WorkPutting Compilers to Work
Putting Compilers to Work
 
Php unit i
Php unit i Php unit i
Php unit i
 
Dutch php conference_2010_opm
Dutch php conference_2010_opmDutch php conference_2010_opm
Dutch php conference_2010_opm
 
Optimizing performance
Optimizing performanceOptimizing performance
Optimizing performance
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
 
A look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architectureA look at FastCgi & Mod_PHP architecture
A look at FastCgi & Mod_PHP architecture
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
 
From PHP to Hack as a Stack and Back
From PHP to Hack as a Stack and BackFrom PHP to Hack as a Stack and Back
From PHP to Hack as a Stack and Back
 
ReactPHP + Symfony
ReactPHP + SymfonyReactPHP + Symfony
ReactPHP + Symfony
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
 
Php internal architecture
Php internal architecturePhp internal architecture
Php internal architecture
 
Php hypertext Preprocessor
Php hypertext PreprocessorPhp hypertext Preprocessor
Php hypertext Preprocessor
 
Phalcon Framework: San Antonio Web Developers Group
Phalcon Framework: San Antonio Web Developers Group Phalcon Framework: San Antonio Web Developers Group
Phalcon Framework: San Antonio Web Developers Group
 

Recently uploaded

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

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
  • 16.
  • 17.
  • 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