Daniel Sloof - MM14NL
Upcoming SlideShare
Loading in...5
×
 

Daniel Sloof - MM14NL

on

  • 276 views

HipHop Virtual Machine ...

HipHop Virtual Machine

HHVM is een alternatieve PHP runtime ontwikkelt door Facebook. In sommige gevallen is deze runtime tot 10x sneller dan ‘normaal’ PHP. In deze sessie zal Daniel uitwijden over hoe Magento op HHVM draait, waar de struikelblokken liggen en welke performance verbeteringen je kunt verwachten.

Statistics

Views

Total Views
276
Views on SlideShare
257
Embed Views
19

Actions

Likes
0
Downloads
3
Comments
0

1 Embed 19

http://www.dutchento.org 19

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Daniel Sloof - MM14NL Daniel Sloof - MM14NL Presentation Transcript

  • Magento on HHVM Speeding up your webshop with a drop-in PHP replacement.
  • Daniel Sloof https://twitter.com/daniel_sloof https://github.com/danslo daniel@rubic.nl
  • 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 Modified? Invalidate cache Compile to Bytecode Run Bytecode No Yes● PHP5 style bytecode 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 Run BytecodeCompile to Native Run Native No No Yes Yes Yes No
  • So what’s 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
  • What that means for Magento... ● Community and Enterprise Editions running stable. ● Passes 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.8 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 mechanism 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 the Hack? Moving to HHVM gets even more awesome... ● Statically typed language ● Type annotations ● Generics ● Async ● Lambda’s ● Collections ● Built-in user attributes
  • Possible issues ● Third party modules may still trigger HHVM incompatibilities ● Bleeding edge software, especially in regards to Magento ● Relatively hard to fix issues due to complex HHVM codebase
  • Gradually migrating...? You have an existing store, but: ● you are not willing to commit to running your entire website on HHVM, or; ● maybe you are running Ioncube extensions which make your store incompatible But you still want to run certain parts of your website (indexing!) through HHVM? Possible! https://github.com/danslo/HiphopIndexer/
  • One more thing... Testing Magento modules publicly: ● URL: https://github.com/danslo/Magento- HHVM-Module-Compatibility ● Uses Magento Composer Installer ● Some supported modules: o AW_Blog Aoe_Profiler o Nexcess_Turpentine Danslo_HiphopIndexer o Cm_Cache_Backend_Redis Aoe_Scheduler o Made_Cache <your module?>
  • Thank you...