SlideShare a Scribd company logo
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
Some background 
Specification 
Ruby Language 
JRuby Rubinius IronRuby 
Java Language 
Oracle Harmony Dalvik 
Implementation 
Sensible Language Design 
Zend PHP 
PHP Language 
Zend PHP HHVM 
PHP
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... 
● All of these patches already merged back 
into the official (github) repository 
● Still actively involved and committed to make 
HHVM a good place for Magento
Resulted in... fixing HHVM 
Activity for the HHVM project on github in June 
“Of the top 15 contributors, only 9 are facebook employees.”
Important configuration 
● hhvm.enable_zend_sorting = 1 
○ PHP user sorting “If two members compare as 
equal, their relative order in the sorted array is 
undefined.” 
○ HHVM implements a faster sorting algorithm that 
has a different (undefined) order. 
○ Magento relies on this undefined behavior. 
● hhvm.enable_obj_destruct_call = 1 
○ HHVM by default does not call destructors for 
objects that are alive at the end of the request. 
○ Magento Connect Downloader uses object 
destructors to send output to the browser.
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
Benchmarks: Other
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 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
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!
What is Hack? 
Moving to HHVM gets even more awesome. 
● Statically typed language 
● Type annotations 
● Generics 
● Async 
● Lambda’s 
● Collections 
● Built-in user attributes 
http://hacklang.org/
Hack: Annotating
Hack: 
Constructor Argument Promotion
Hack: Special Attributes
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 about the future? 
Open Source Benchmark Suite 
● Automatic installation of popular frameworks 
(Magento, Drupal, Wordpress, etc). 
● Configures your web server 
● Generates reliable performance metrics to 
compare PHP implementations (HHVM, 
PHP7). 
https://github.com/hhvm/oss-performance/
What about the future?
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/
Thank you! 
Questions?

More Related Content

What's hot

It gilde 20150209
It gilde 20150209It gilde 20150209
It gilde 20150209
Martin Simons
 
Chromium: NaCl and Pepper API
Chromium: NaCl and Pepper APIChromium: NaCl and Pepper API
Chromium: NaCl and Pepper API
Chang W. Doh
 
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP
Mohammad Emran Hasan
 
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
Jani Tarvainen
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packagertechmemo
 
Patterns: The new Javascript framweork
Patterns: The new Javascript framweorkPatterns: The new Javascript framweork
Patterns: The new Javascript framweork
Franco Pellegrini
 
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
Chau Thanh
 
How We Bacame a 'Go' Company
How We Bacame a 'Go' CompanyHow We Bacame a 'Go' Company
How We Bacame a 'Go' Company
Luka Napotnik
 
Last Month in PHP - June 2016
Last Month in PHP - June 2016Last Month in PHP - June 2016
Last Month in PHP - June 2016
Eric Poe
 
What the HACK is HHVM?
What the HACK is HHVM?What the HACK is HHVM?
What the HACK is HHVM?
Hean Hong Leong
 
Becoming A Php Ninja
Becoming A Php NinjaBecoming A Php Ninja
Becoming A Php Ninja
Mohammad Emran Hasan
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packager
techmemo
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
sosorry
 
Andrii Shumada "No excuses for not writing tests"
Andrii Shumada "No excuses for not writing tests"Andrii Shumada "No excuses for not writing tests"
Andrii Shumada "No excuses for not writing tests"
Fwdays
 
Php under the_hood
Php under the_hoodPhp under the_hood
Php under the_hoodfrank_neff
 
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
 Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ... Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
HighSolutions Sp. z o.o.
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCI
Thiago Paes
 
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
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
Vijay Kumbhar
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-step
Michelangelo van Dam
 

What's hot (20)

It gilde 20150209
It gilde 20150209It gilde 20150209
It gilde 20150209
 
Chromium: NaCl and Pepper API
Chromium: NaCl and Pepper APIChromium: NaCl and Pepper API
Chromium: NaCl and Pepper API
 
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise 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
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packager
 
Patterns: The new Javascript framweork
Patterns: The new Javascript framweorkPatterns: The new Javascript framweork
Patterns: The new Javascript framweork
 
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
 
How We Bacame a 'Go' Company
How We Bacame a 'Go' CompanyHow We Bacame a 'Go' Company
How We Bacame a 'Go' Company
 
Last Month in PHP - June 2016
Last Month in PHP - June 2016Last Month in PHP - June 2016
Last Month in PHP - June 2016
 
What the HACK is HHVM?
What the HACK is HHVM?What the HACK is HHVM?
What the HACK is HHVM?
 
Becoming A Php Ninja
Becoming A Php NinjaBecoming A Php Ninja
Becoming A Php Ninja
 
CPAN Packager
CPAN PackagerCPAN Packager
CPAN Packager
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
Andrii Shumada "No excuses for not writing tests"
Andrii Shumada "No excuses for not writing tests"Andrii Shumada "No excuses for not writing tests"
Andrii Shumada "No excuses for not writing tests"
 
Php under the_hood
Php under the_hoodPhp under the_hood
Php under the_hood
 
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
 Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ... Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCI
 
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
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-step
 

Similar to Daniel Sloof: Magento on HHVM

Hhvm vs php
Hhvm vs phpHhvm vs php
Подталкиваем 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
 
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
 
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
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In Php
Wilco Jansen
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application Deployment
Shahar Evron
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
Engineor
 
HipHop Virtual Machine
HipHop Virtual MachineHipHop Virtual Machine
HipHop Virtual Machine
Radu Murzea
 
Evolution of deploy.sh
Evolution of deploy.shEvolution of deploy.sh
Evolution of deploy.sh
Leonid Mamchenkov
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
Wim Godden
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP Extensions
MichaelBrunoLochemem
 
Drupal hhvm benchmark
Drupal hhvm benchmarkDrupal hhvm benchmark
Drupal hhvm benchmark
Le Thanh Sang
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
Engineor
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
Shyam Sunder Verma
 
How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016
How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016
How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016
Badoo
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
Blend Interactive
 

Similar to Daniel Sloof: Magento on HHVM (20)

Wc13
Wc13Wc13
Wc13
 
Hhvm vs php
Hhvm vs phpHhvm vs php
Hhvm vs php
 
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
Подталкиваем PHP к пределу возможностей, Michael Armstrong (lite speed techno...
 
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
 
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
 
Hack and HHVM
Hack and HHVMHack and HHVM
Hack and HHVM
 
Continuous Integration In Php
Continuous Integration In PhpContinuous Integration In Php
Continuous Integration In Php
 
Best Practices in PHP Application Deployment
Best Practices in PHP Application DeploymentBest Practices in PHP Application Deployment
Best Practices in PHP Application Deployment
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
 
HipHop Virtual Machine
HipHop Virtual MachineHipHop Virtual Machine
HipHop Virtual Machine
 
Evolution of deploy.sh
Evolution of deploy.shEvolution of deploy.sh
Evolution of deploy.sh
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP Extensions
 
Drupal hhvm benchmark
Drupal hhvm benchmarkDrupal hhvm benchmark
Drupal hhvm benchmark
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
 
Joomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation TestingJoomla Code Quality Control and Automation Testing
Joomla Code Quality Control and Automation Testing
 
How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016
How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016
How Badoo Saved $1M Switching to PHP7 - Nikolay Krapivnyy - PHPDay Verona 2016
 
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
"Building Modern PHP Applications" - Jackson Murtha, South Dakota Code Camp 2012
 

More from Meet Magento Poland

Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...
Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...
Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...
Meet Magento Poland
 
Toni Anicic: Conversion Rate Optimization for Magento in the Age of Responsive
Toni Anicic: Conversion Rate Optimization for Magento  in the Age of ResponsiveToni Anicic: Conversion Rate Optimization for Magento  in the Age of Responsive
Toni Anicic: Conversion Rate Optimization for Magento in the Age of Responsive
Meet Magento Poland
 
Davide Consonni: Best Practices to Improve Customer Experience and Conversions
Davide Consonni: Best Practices to Improve Customer Experience and ConversionsDavide Consonni: Best Practices to Improve Customer Experience and Conversions
Davide Consonni: Best Practices to Improve Customer Experience and Conversions
Meet Magento Poland
 
Eugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buy
Eugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buyEugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buy
Eugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buy
Meet Magento Poland
 
Michał Sadowski: Nowoczesne metody promocji marki w sieci
Michał Sadowski: Nowoczesne metody promocji marki w sieciMichał Sadowski: Nowoczesne metody promocji marki w sieci
Michał Sadowski: Nowoczesne metody promocji marki w sieci
Meet Magento Poland
 
Paulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commerce
Paulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commercePaulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commerce
Paulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commerce
Meet Magento Poland
 
Krzysztof Wroński: Let’s do this project... together!
Krzysztof Wroński: Let’s do this project... together!Krzysztof Wroński: Let’s do this project... together!
Krzysztof Wroński: Let’s do this project... together!
Meet Magento Poland
 
Fabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOL
Fabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOLFabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOL
Fabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOLMeet Magento Poland
 
Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...
Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...
Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...Meet Magento Poland
 
Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...
Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...
Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...Meet Magento Poland
 
Fabrizio Balliano: Tracking visitors despite Varnish
Fabrizio Balliano: Tracking visitors despite VarnishFabrizio Balliano: Tracking visitors despite Varnish
Fabrizio Balliano: Tracking visitors despite VarnishMeet Magento Poland
 
Alex Ursa: ERP Integrations with Magento: How to do it fast, good and affordable
Alex Ursa: ERP Integrations with Magento: How to do it fast, good and affordableAlex Ursa: ERP Integrations with Magento: How to do it fast, good and affordable
Alex Ursa: ERP Integrations with Magento: How to do it fast, good and affordableMeet Magento Poland
 
Robert Żochowski, Jarosław Gąsiorek: Integracja Magento SAP
Robert Żochowski, Jarosław Gąsiorek: Integracja Magento SAPRobert Żochowski, Jarosław Gąsiorek: Integracja Magento SAP
Robert Żochowski, Jarosław Gąsiorek: Integracja Magento SAPMeet Magento Poland
 
Maciej Ostrowski: Podstawy implementacji multi-inwentarza w Magento
Maciej Ostrowski: Podstawy implementacji multi-inwentarza w MagentoMaciej Ostrowski: Podstawy implementacji multi-inwentarza w Magento
Maciej Ostrowski: Podstawy implementacji multi-inwentarza w MagentoMeet Magento Poland
 
Andrei Vashkievich: 5 Steps For No-SPAM E-mails in Magento
Andrei Vashkievich: 5 Steps For No-SPAM E-mails in MagentoAndrei Vashkievich: 5 Steps For No-SPAM E-mails in Magento
Andrei Vashkievich: 5 Steps For No-SPAM E-mails in MagentoMeet Magento Poland
 
Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...
Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...
Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...Meet Magento Poland
 
Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.
Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.
Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.Meet Magento Poland
 
Rytis Lauris: Missed opportunities of automated
cart recovery messages
Rytis Lauris: Missed opportunities of automated
cart recovery messagesRytis Lauris: Missed opportunities of automated
cart recovery messages
Rytis Lauris: Missed opportunities of automated
cart recovery messages
Meet Magento Poland
 
Viacheslav Kravchuk: Conversion rate optimisation. What’s really proved to m...
Viacheslav Kravchuk: Conversion rate optimisation.  What’s really proved to m...Viacheslav Kravchuk: Conversion rate optimisation.  What’s really proved to m...
Viacheslav Kravchuk: Conversion rate optimisation. What’s really proved to m...
Meet Magento Poland
 
Thomas Goletz: Commerce & growth – why is it important to have a broader view
Thomas Goletz: Commerce & growth – why is it important to have a broader viewThomas Goletz: Commerce & growth – why is it important to have a broader view
Thomas Goletz: Commerce & growth – why is it important to have a broader view
Meet Magento Poland
 

More from Meet Magento Poland (20)

Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...
Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...
Wiktor Naskręt: Jednorazowa przygoda, przelotna znajomość, 
zżyte małżeństwo...
 
Toni Anicic: Conversion Rate Optimization for Magento in the Age of Responsive
Toni Anicic: Conversion Rate Optimization for Magento  in the Age of ResponsiveToni Anicic: Conversion Rate Optimization for Magento  in the Age of Responsive
Toni Anicic: Conversion Rate Optimization for Magento in the Age of Responsive
 
Davide Consonni: Best Practices to Improve Customer Experience and Conversions
Davide Consonni: Best Practices to Improve Customer Experience and ConversionsDavide Consonni: Best Practices to Improve Customer Experience and Conversions
Davide Consonni: Best Practices to Improve Customer Experience and Conversions
 
Eugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buy
Eugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buyEugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buy
Eugene Vtorov: Integration of eCommerce and 3D Technologies: see what you buy
 
Michał Sadowski: Nowoczesne metody promocji marki w sieci
Michał Sadowski: Nowoczesne metody promocji marki w sieciMichał Sadowski: Nowoczesne metody promocji marki w sieci
Michał Sadowski: Nowoczesne metody promocji marki w sieci
 
Paulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commerce
Paulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commercePaulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commerce
Paulina Rutecka: Trudni klienci jako choroba przenoszona drogą e-commerce
 
Krzysztof Wroński: Let’s do this project... together!
Krzysztof Wroński: Let’s do this project... together!Krzysztof Wroński: Let’s do this project... together!
Krzysztof Wroński: Let’s do this project... together!
 
Fabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOL
Fabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOLFabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOL
Fabien Blechschmidt: HYPERTEXT TRANSFER PROTOCOL
 
Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...
Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...
Patrycja Andrzejewska: Responsive checkout - Jak zoptymalizować proces zakup...
 
Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...
Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...
Mateusz Falkowski: Merchandising w e-commerce. Zarządzanie produktem i pozyc...
 
Fabrizio Balliano: Tracking visitors despite Varnish
Fabrizio Balliano: Tracking visitors despite VarnishFabrizio Balliano: Tracking visitors despite Varnish
Fabrizio Balliano: Tracking visitors despite Varnish
 
Alex Ursa: ERP Integrations with Magento: How to do it fast, good and affordable
Alex Ursa: ERP Integrations with Magento: How to do it fast, good and affordableAlex Ursa: ERP Integrations with Magento: How to do it fast, good and affordable
Alex Ursa: ERP Integrations with Magento: How to do it fast, good and affordable
 
Robert Żochowski, Jarosław Gąsiorek: Integracja Magento SAP
Robert Żochowski, Jarosław Gąsiorek: Integracja Magento SAPRobert Żochowski, Jarosław Gąsiorek: Integracja Magento SAP
Robert Żochowski, Jarosław Gąsiorek: Integracja Magento SAP
 
Maciej Ostrowski: Podstawy implementacji multi-inwentarza w Magento
Maciej Ostrowski: Podstawy implementacji multi-inwentarza w MagentoMaciej Ostrowski: Podstawy implementacji multi-inwentarza w Magento
Maciej Ostrowski: Podstawy implementacji multi-inwentarza w Magento
 
Andrei Vashkievich: 5 Steps For No-SPAM E-mails in Magento
Andrei Vashkievich: 5 Steps For No-SPAM E-mails in MagentoAndrei Vashkievich: 5 Steps For No-SPAM E-mails in Magento
Andrei Vashkievich: 5 Steps For No-SPAM E-mails in Magento
 
Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...
Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...
Mateusz Rzetecki: Redesign serwisu w zgodzie z działaniami SEO - o czym pamię...
 
Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.
Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.
Maciej Rudnicki: Zautomatyzowane środowisko deweloperskie.
 
Rytis Lauris: Missed opportunities of automated
cart recovery messages
Rytis Lauris: Missed opportunities of automated
cart recovery messagesRytis Lauris: Missed opportunities of automated
cart recovery messages
Rytis Lauris: Missed opportunities of automated
cart recovery messages
 
Viacheslav Kravchuk: Conversion rate optimisation. What’s really proved to m...
Viacheslav Kravchuk: Conversion rate optimisation.  What’s really proved to m...Viacheslav Kravchuk: Conversion rate optimisation.  What’s really proved to m...
Viacheslav Kravchuk: Conversion rate optimisation. What’s really proved to m...
 
Thomas Goletz: Commerce & growth – why is it important to have a broader view
Thomas Goletz: Commerce & growth – why is it important to have a broader viewThomas Goletz: Commerce & growth – why is it important to have a broader view
Thomas Goletz: Commerce & growth – why is it important to have a broader view
 

Recently uploaded

Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
Access Innovations, Inc.
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
OECD Directorate for Financial and Enterprise Affairs
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
OWASP Beja
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
IP ServerOne
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
Vladimir Samoylov
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Orkestra
 

Recently uploaded (16)

Eureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 PresentationEureka, I found it! - Special Libraries Association 2021 Presentation
Eureka, I found it! - Special Libraries Association 2021 Presentation
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
Sharpen existing tools or get a new toolbox? Contemporary cluster initiatives...
 

Daniel Sloof: Magento on HHVM

  • 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. Some background Specification Ruby Language JRuby Rubinius IronRuby Java Language Oracle Harmony Dalvik Implementation Sensible Language Design Zend PHP PHP Language Zend PHP HHVM PHP
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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... ● All of these patches already merged back into the official (github) repository ● Still actively involved and committed to make HHVM a good place for Magento
  • 9. Resulted in... fixing HHVM Activity for the HHVM project on github in June “Of the top 15 contributors, only 9 are facebook employees.”
  • 10. Important configuration ● hhvm.enable_zend_sorting = 1 ○ PHP user sorting “If two members compare as equal, their relative order in the sorted array is undefined.” ○ HHVM implements a faster sorting algorithm that has a different (undefined) order. ○ Magento relies on this undefined behavior. ● hhvm.enable_obj_destruct_call = 1 ○ HHVM by default does not call destructors for objects that are alive at the end of the request. ○ Magento Connect Downloader uses object destructors to send output to the browser.
  • 11. 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.
  • 12. 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
  • 13. Benchmarks: Response time Average across 50 requests
  • 14. Benchmarks: Transaction rate While increasing siege concurrency until avg. response time ~2 seconds
  • 16. 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.
  • 17. What about PHPNG / PHP7? ● Better performance than PHP5.5, but still trails behind HHVM quite significantly. ● Not ready. http://goo.gl/MyUBeu
  • 18. 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
  • 19. 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!
  • 20. What is Hack? Moving to HHVM gets even more awesome. ● Statically typed language ● Type annotations ● Generics ● Async ● Lambda’s ● Collections ● Built-in user attributes http://hacklang.org/
  • 24. 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/
  • 25. What about the future? Open Source Benchmark Suite ● Automatic installation of popular frameworks (Magento, Drupal, Wordpress, etc). ● Configures your web server ● Generates reliable performance metrics to compare PHP implementations (HHVM, PHP7). https://github.com/hhvm/oss-performance/
  • 26. What about the future?
  • 27. 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/