SlideShare una empresa de Scribd logo
1 de 20
Magento on 
HHVM 
Speeding up your webshop with a drop-in PHP 
replacement.
Daniel Sloof 
https://twitter.com/daniel_sloof 
https://github.com/danslo 
dsloof@engineyard.com
What is HHVM? 
● HipHop Virtual Machine 
● Created by engineers at Facebook 
● Essentially a reimplementation of PHP 
● Originally translated PHP to C++, now 
translates PHP to bytecode 
● Just-in-time compiler, turning generated 
bytecode into machine code 
● In some cases 5 to 10 times faster than 
regular PHP
Bytecode compilation 
● PHP5 style bytecode Yes 
Modified? Invalidate cache 
Compile to 
Bytecode 
Run Bytecode 
No 
execution 
● APC-like caching of 
bytecode 
● Performance is quite 
similar to Zend PHP
Just In Time Compiler 
Modified? 
Have 
Native? 
Hot? 
Invalidate Cache 
Compile to 
Bytecode 
Compile to Native Run Bytecode 
Run Native 
No 
No 
Yes 
Yes 
Yes No
What was the problem? 
● HHVM not entirely compatible with PHP 
● Magento’s PHP triggering many of these 
incompatibilities 
● Choosing between 
○ Forking Magento to work around HHVM 
○ Fixing issues within the extensive HHVM C++ 
codebase
Resulted in... fixing HHVM 
● Already over 100 commits fixing Magento 
related HHVM bugs; 
○ SimpleXML (majority of bugfixes) 
○ sessions 
○ number_format 
○ __get and __set 
○ many more... 
● Most of these fixes already merged back into 
the official (github) repository 
Activity for the HHVM project on github in June 
● Still actively “Of the top involved 15 contributors, and only 9 are committed facebook employees.” 
to make 
HHVM a good place for Magento
What that means for Magento... 
● Community and Enterprise Editions running 
stable. 
● Passes near 100% of the Test Automation 
Framework. 
● Large boost in improvement. 
● Works with FastCGI, so keep most of your 
current web-configuration, rewrites, etc.
Benchmarks 
Before we go to the results... 
● Magento 1.9 with sample data 
● Standard nginx / php-fpm / percona stack 
(with PHP 5.5 opcode cache) 
● Standard HHVM configuration (repo-authoritative 
mode disabled, JIT enabled) 
● Tool of choice: siege
Benchmarks: Response time 
Average across 50 requests
Benchmarks: Transaction rate 
While increasing siege concurrency until avg. 
response time ~2 seconds
What about 
<insert caching solution here>? 
● HHVM does not get in the way 
● Dynamic content still needs to be generated 
● Replaces PHP - not Varnish, Redis, FPC, 
Block Cache, etc. 
● As long as you are burning CPU cycles 
(always), you will benefit from HHVM 
● Think about speeding up indexing, order 
placement, routing, etc.
What about PHPNG / PHP7? 
● Better performance than PHP5.5, but still 
trails behind HHVM quite significantly. 
● Not production ready. 
http://goo.gl/MyUBeu
How do we know it is stable? 
● Unfortunately there are no unit tests for 
(core) Magento 1.x 
● Brushed up the Test Automation Framework 
● Automated setup of test environment using 
Chef 
● Nightly builds to check Magento compatibility 
on HHVM to make it easier to spot 
regressions 
● Open-sourced very soon
What about the future? 
● Facebook is committed to open source: 
several employees work on it exclusively. 
● HHVM tracks a number of popular 
frameworks and runs their PHPUnit suites 
● Magento 2 is part of that list 
http://hhvm.com/frameworks/
What is Hack? 
Moving to HHVM gets even more awesome. 
● Statically typed language 
● Type annotations 
● Generics 
● Async 
● Lambda’s 
● Collections 
● Built-in user attributes
Can we gradually migrate? 
Store not entirely compatible with HHVM and 
still want to run it. 
● Problem is isolated to a (subset of) page(s): 
use web-server configuration to split load. 
● Problem is more widespread (incompatible 
global observers, ioncube, etc): 
https://github.com/danslo/HiphopIndexer/
On the topic of debugging 
● HHVM comes with something called HPHPd 
● CLI Based, comparable to GDB 
● No (known) support for any IDEs 
Latest stable release 
has xdebug support!
Where can we run it? 
Leading platform for merchants and dev shops 
running high performance Magento apps in the 
cloud 
● Highly optimized Magento PaaS 
● 24/7 white glove DevOps support 
● Over 1 billion hours deployed on AWS 
https://www.engineyard.com/magento
Thank you! 
Questions?

Más contenido relacionado

La actualidad más candente

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
 
Design a scalable site: Problem and solutions
Design a scalable site: Problem and solutionsDesign a scalable site: Problem and solutions
Design a scalable site: Problem and solutionsChau Thanh
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsAlessandro Pilotti
 
Professional PHP: an open-source alternative for enterprise development [Kort...
Professional PHP: an open-source alternative for enterprise development [Kort...Professional PHP: an open-source alternative for enterprise development [Kort...
Professional PHP: an open-source alternative for enterprise development [Kort...Combell NV
 
The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)Stefan Koopmanschap
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packagertechmemo
 
SydPHP March 2012 Meetup
SydPHP March 2012 MeetupSydPHP March 2012 Meetup
SydPHP March 2012 MeetupGraham Weldon
 
Hands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestHands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestPatrick Meenan
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packagertechmemo
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovskyphp-user-group-minsk
 
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
 
Re-imaginging CakePHP
Re-imaginging CakePHPRe-imaginging CakePHP
Re-imaginging CakePHPGraham Weldon
 
mod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLImod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLIJacques Woodcock
 
PHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traitsPHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traitsGraham Weldon
 
Boost Magento perfomance with Queues
Boost Magento perfomance with QueuesBoost Magento perfomance with Queues
Boost Magento perfomance with QueuesManuele Menozzi
 
Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!WordCamp Cape Town
 
First steps of programming with php
First steps of programming with phpFirst steps of programming with php
First steps of programming with phpKanha Sahu
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing DevelopmentAdam Culp
 

La actualidad más candente (20)

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
 
Design a scalable site: Problem and solutions
Design a scalable site: Problem and solutionsDesign a scalable site: Problem and solutions
Design a scalable site: Problem and solutions
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
Professional PHP: an open-source alternative for enterprise development [Kort...
Professional PHP: an open-source alternative for enterprise development [Kort...Professional PHP: an open-source alternative for enterprise development [Kort...
Professional PHP: an open-source alternative for enterprise development [Kort...
 
The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packager
 
The Power of Refactoring
The Power of RefactoringThe Power of Refactoring
The Power of Refactoring
 
SydPHP March 2012 Meetup
SydPHP March 2012 MeetupSydPHP March 2012 Meetup
SydPHP March 2012 Meetup
 
Hands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetestHands on performance testing and analysis with web pagetest
Hands on performance testing and analysis with web pagetest
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packager
 
Symfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim RomanovskySymfony Under Control by Maxim Romanovsky
Symfony Under Control by Maxim Romanovsky
 
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
 
It gilde 20150209
It gilde 20150209It gilde 20150209
It gilde 20150209
 
Re-imaginging CakePHP
Re-imaginging CakePHPRe-imaginging CakePHP
Re-imaginging CakePHP
 
mod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLImod_php vs FastCGI vs FPM vs CLI
mod_php vs FastCGI vs FPM vs CLI
 
PHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traitsPHP 5.4 - Begin your love affair with traits
PHP 5.4 - Begin your love affair with traits
 
Boost Magento perfomance with Queues
Boost Magento perfomance with QueuesBoost Magento perfomance with Queues
Boost Magento perfomance with Queues
 
Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!Anthony Somerset - Site Speed = Success!
Anthony Somerset - Site Speed = Success!
 
First steps of programming with php
First steps of programming with phpFirst steps of programming with php
First steps of programming with php
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing Development
 

Similar a Magento on HHVM. Daniel Sloof

IPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHopIPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHopSteve Kamerman
 
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...Ontico
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPChau Thanh
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPVõ Duy Tuấn
 
zingmepracticeforbuildingscalablewebsitewithphp
zingmepracticeforbuildingscalablewebsitewithphpzingmepracticeforbuildingscalablewebsitewithphp
zingmepracticeforbuildingscalablewebsitewithphphazzaz
 
01 zingme practice for building scalable website with php
01 zingme practice for building scalable website with php01 zingme practice for building scalable website with php
01 zingme practice for building scalable website with phpNguyen Duc Phu
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In PhpWilco Jansen
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testingEngineor
 
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
 
HipHop Virtual Machine
HipHop Virtual MachineHipHop Virtual Machine
HipHop Virtual MachineRadu Murzea
 
Drupal hhvm benchmark
Drupal hhvm benchmarkDrupal hhvm benchmark
Drupal hhvm benchmarkLe Thanh Sang
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHPSeravo
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentShahar Evron
 
Making sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersMaking sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersLewiz
 
Scraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPPaul Redmond
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magentoMathew Beane
 

Similar a Magento on HHVM. Daniel Sloof (20)

IPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHopIPC 2013 - High Performance PHP with HipHop
IPC 2013 - High Performance PHP with HipHop
 
What the HACK is HHVM?
What the HACK is HHVM?What the HACK is HHVM?
What the HACK is HHVM?
 
Hhvm vs php
Hhvm vs phpHhvm vs php
Hhvm vs php
 
Wc13
Wc13Wc13
Wc13
 
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
 
zingmepracticeforbuildingscalablewebsitewithphp
zingmepracticeforbuildingscalablewebsitewithphpzingmepracticeforbuildingscalablewebsitewithphp
zingmepracticeforbuildingscalablewebsitewithphp
 
01 zingme practice for building scalable website with php
01 zingme practice for building scalable website with php01 zingme practice for building scalable website with php
01 zingme practice for building scalable website with php
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In Php
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
 
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
 
HipHop Virtual Machine
HipHop Virtual MachineHipHop Virtual Machine
HipHop Virtual Machine
 
Hack and HHVM
Hack and HHVMHack and HHVM
Hack and HHVM
 
Drupal hhvm benchmark
Drupal hhvm benchmarkDrupal hhvm benchmark
Drupal hhvm benchmark
 
Use Xdebug to profile PHP
Use Xdebug to profile PHPUse Xdebug to profile PHP
Use Xdebug to profile PHP
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application Deployment
 
Making sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developersMaking sense of the front-end, for PHP developers
Making sense of the front-end, for PHP developers
 
Scraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHP
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magento
 

Más de MeetMagentoNY2014

Two approaches to RWD: Pure & Hybrid. Brendan Falkowski
Two approaches to RWD: Pure & Hybrid. Brendan Falkowski Two approaches to RWD: Pure & Hybrid. Brendan Falkowski
Two approaches to RWD: Pure & Hybrid. Brendan Falkowski MeetMagentoNY2014
 
Transforming retail into me-tail. Jonny Dixon
Transforming retail into me-tail. Jonny DixonTransforming retail into me-tail. Jonny Dixon
Transforming retail into me-tail. Jonny DixonMeetMagentoNY2014
 
CRM for Ecommerce. Jary Carter
CRM for Ecommerce. Jary CarterCRM for Ecommerce. Jary Carter
CRM for Ecommerce. Jary CarterMeetMagentoNY2014
 
Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent MeetMagentoNY2014
 
Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...
Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...
Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...MeetMagentoNY2014
 
Deryck harlick presentation mmny14
Deryck harlick presentation mmny14Deryck harlick presentation mmny14
Deryck harlick presentation mmny14MeetMagentoNY2014
 
The forgotten heart of Magento. Empowering End Users. Deryck harlick
The forgotten heart of Magento. Empowering End Users. Deryck harlickThe forgotten heart of Magento. Empowering End Users. Deryck harlick
The forgotten heart of Magento. Empowering End Users. Deryck harlickMeetMagentoNY2014
 
Customer acquisition through gifting. Monika kochhar
Customer acquisition through gifting. Monika kochharCustomer acquisition through gifting. Monika kochhar
Customer acquisition through gifting. Monika kochharMeetMagentoNY2014
 
Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićMeetMagentoNY2014
 
Seeking a center of gravity in Magento's eCommerce Community. Kurt Theobald
Seeking a center of gravity in Magento's eCommerce Community. Kurt TheobaldSeeking a center of gravity in Magento's eCommerce Community. Kurt Theobald
Seeking a center of gravity in Magento's eCommerce Community. Kurt TheobaldMeetMagentoNY2014
 
What we learned from travelling around the world: Meet Magento international....
What we learned from travelling around the world: Meet Magento international....What we learned from travelling around the world: Meet Magento international....
What we learned from travelling around the world: Meet Magento international....MeetMagentoNY2014
 
The master chef lesson. Luz De-León
The master chef lesson. Luz De-LeónThe master chef lesson. Luz De-León
The master chef lesson. Luz De-LeónMeetMagentoNY2014
 
CRM and Ecommerce. Yoav Kutner
CRM and Ecommerce. Yoav Kutner CRM and Ecommerce. Yoav Kutner
CRM and Ecommerce. Yoav Kutner MeetMagentoNY2014
 
Magento Community. Ben Marks
Magento Community. Ben MarksMagento Community. Ben Marks
Magento Community. Ben MarksMeetMagentoNY2014
 

Más de MeetMagentoNY2014 (14)

Two approaches to RWD: Pure & Hybrid. Brendan Falkowski
Two approaches to RWD: Pure & Hybrid. Brendan Falkowski Two approaches to RWD: Pure & Hybrid. Brendan Falkowski
Two approaches to RWD: Pure & Hybrid. Brendan Falkowski
 
Transforming retail into me-tail. Jonny Dixon
Transforming retail into me-tail. Jonny DixonTransforming retail into me-tail. Jonny Dixon
Transforming retail into me-tail. Jonny Dixon
 
CRM for Ecommerce. Jary Carter
CRM for Ecommerce. Jary CarterCRM for Ecommerce. Jary Carter
CRM for Ecommerce. Jary Carter
 
Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent Magento 2 overview. Alan Kent
Magento 2 overview. Alan Kent
 
Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...
Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...
Conversion rate optimisation. What's realluy proved to matter? Viacheslav kra...
 
Deryck harlick presentation mmny14
Deryck harlick presentation mmny14Deryck harlick presentation mmny14
Deryck harlick presentation mmny14
 
The forgotten heart of Magento. Empowering End Users. Deryck harlick
The forgotten heart of Magento. Empowering End Users. Deryck harlickThe forgotten heart of Magento. Empowering End Users. Deryck harlick
The forgotten heart of Magento. Empowering End Users. Deryck harlick
 
Customer acquisition through gifting. Monika kochhar
Customer acquisition through gifting. Monika kochharCustomer acquisition through gifting. Monika kochhar
Customer acquisition through gifting. Monika kochhar
 
Build Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje JurišićBuild Better Responsive websites. Hrvoje Jurišić
Build Better Responsive websites. Hrvoje Jurišić
 
Seeking a center of gravity in Magento's eCommerce Community. Kurt Theobald
Seeking a center of gravity in Magento's eCommerce Community. Kurt TheobaldSeeking a center of gravity in Magento's eCommerce Community. Kurt Theobald
Seeking a center of gravity in Magento's eCommerce Community. Kurt Theobald
 
What we learned from travelling around the world: Meet Magento international....
What we learned from travelling around the world: Meet Magento international....What we learned from travelling around the world: Meet Magento international....
What we learned from travelling around the world: Meet Magento international....
 
The master chef lesson. Luz De-León
The master chef lesson. Luz De-LeónThe master chef lesson. Luz De-León
The master chef lesson. Luz De-León
 
CRM and Ecommerce. Yoav Kutner
CRM and Ecommerce. Yoav Kutner CRM and Ecommerce. Yoav Kutner
CRM and Ecommerce. Yoav Kutner
 
Magento Community. Ben Marks
Magento Community. Ben MarksMagento Community. Ben Marks
Magento Community. Ben Marks
 

Último

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Último (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Magento on HHVM. Daniel Sloof

  • 1. Magento on HHVM Speeding up your webshop with a drop-in PHP replacement.
  • 2. Daniel Sloof https://twitter.com/daniel_sloof https://github.com/danslo dsloof@engineyard.com
  • 3. What is HHVM? ● HipHop Virtual Machine ● Created by engineers at Facebook ● Essentially a reimplementation of PHP ● Originally translated PHP to C++, now translates PHP to bytecode ● Just-in-time compiler, turning generated bytecode into machine code ● In some cases 5 to 10 times faster than regular PHP
  • 4. Bytecode compilation ● PHP5 style bytecode Yes Modified? Invalidate cache Compile to Bytecode Run Bytecode No execution ● APC-like caching of bytecode ● Performance is quite similar to Zend PHP
  • 5. Just In Time Compiler Modified? Have Native? Hot? Invalidate Cache Compile to Bytecode Compile to Native Run Bytecode Run Native No No Yes Yes Yes No
  • 6. What was the problem? ● HHVM not entirely compatible with PHP ● Magento’s PHP triggering many of these incompatibilities ● Choosing between ○ Forking Magento to work around HHVM ○ Fixing issues within the extensive HHVM C++ codebase
  • 7. Resulted in... fixing HHVM ● Already over 100 commits fixing Magento related HHVM bugs; ○ SimpleXML (majority of bugfixes) ○ sessions ○ number_format ○ __get and __set ○ many more... ● Most of these fixes already merged back into the official (github) repository Activity for the HHVM project on github in June ● Still actively “Of the top involved 15 contributors, and only 9 are committed facebook employees.” to make HHVM a good place for Magento
  • 8. What that means for Magento... ● Community and Enterprise Editions running stable. ● Passes near 100% of the Test Automation Framework. ● Large boost in improvement. ● Works with FastCGI, so keep most of your current web-configuration, rewrites, etc.
  • 9. Benchmarks Before we go to the results... ● Magento 1.9 with sample data ● Standard nginx / php-fpm / percona stack (with PHP 5.5 opcode cache) ● Standard HHVM configuration (repo-authoritative mode disabled, JIT enabled) ● Tool of choice: siege
  • 10. Benchmarks: Response time Average across 50 requests
  • 11. Benchmarks: Transaction rate While increasing siege concurrency until avg. response time ~2 seconds
  • 12. What about <insert caching solution here>? ● HHVM does not get in the way ● Dynamic content still needs to be generated ● Replaces PHP - not Varnish, Redis, FPC, Block Cache, etc. ● As long as you are burning CPU cycles (always), you will benefit from HHVM ● Think about speeding up indexing, order placement, routing, etc.
  • 13. What about PHPNG / PHP7? ● Better performance than PHP5.5, but still trails behind HHVM quite significantly. ● Not production ready. http://goo.gl/MyUBeu
  • 14. How do we know it is stable? ● Unfortunately there are no unit tests for (core) Magento 1.x ● Brushed up the Test Automation Framework ● Automated setup of test environment using Chef ● Nightly builds to check Magento compatibility on HHVM to make it easier to spot regressions ● Open-sourced very soon
  • 15. What about the future? ● Facebook is committed to open source: several employees work on it exclusively. ● HHVM tracks a number of popular frameworks and runs their PHPUnit suites ● Magento 2 is part of that list http://hhvm.com/frameworks/
  • 16. What is Hack? Moving to HHVM gets even more awesome. ● Statically typed language ● Type annotations ● Generics ● Async ● Lambda’s ● Collections ● Built-in user attributes
  • 17. Can we gradually migrate? Store not entirely compatible with HHVM and still want to run it. ● Problem is isolated to a (subset of) page(s): use web-server configuration to split load. ● Problem is more widespread (incompatible global observers, ioncube, etc): https://github.com/danslo/HiphopIndexer/
  • 18. On the topic of debugging ● HHVM comes with something called HPHPd ● CLI Based, comparable to GDB ● No (known) support for any IDEs Latest stable release has xdebug support!
  • 19. Where can we run it? Leading platform for merchants and dev shops running high performance Magento apps in the cloud ● Highly optimized Magento PaaS ● 24/7 white glove DevOps support ● Over 1 billion hours deployed on AWS https://www.engineyard.com/magento