+ - 0:00:00
Notes for current slide
Notes for next slide
Jisse Reitsma - Running Magento 2

Running Magento 2

1 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
2 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
  • Founder and lead developer of Yireo
2 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
  • Founder and lead developer of Yireo
  • Wrote 2 developer books for J**ml*
2 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
  • Founder and lead developer of Yireo
  • Wrote 2 developer books for J**ml*
  • Grab a MUGMUG
2 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
  • Founder and lead developer of Yireo
  • Wrote 2 developer books for J**ml*
  • Grab a MUGMUG
  • Part of Zend Z-Team
2 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
  • Founder and lead developer of Yireo
  • Wrote 2 developer books for J**ml*
  • Grab a MUGMUG
  • Part of Zend Z-Team
  • Part of ExtDN
2 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
  • Founder and lead developer of Yireo
  • Wrote 2 developer books for J**ml*
  • Grab a MUGMUG
  • Part of Zend Z-Team
  • Part of ExtDN
  • I live near a palace
2 of 28
Jisse Reitsma - Running Magento 2

The palace

3 of 28
Jisse Reitsma - Running Magento 2

Disclaimers

4 of 28
Jisse Reitsma - Running Magento 2

Disclaimers

  • I do not live in a palace
4 of 28
Jisse Reitsma - Running Magento 2

Disclaimers

  • I do not live in a palace
  • I am not a runner
4 of 28
Jisse Reitsma - Running Magento 2

Disclaimers

  • I do not live in a palace
  • I am not a runner
  • I am just a simple Dutch guy
4 of 28
Jisse Reitsma - Running Magento 2

Disclaimers

  • I do not live in a palace
  • I am not a runner
  • I am just a simple Dutch guy
  • Difference between running from running
    • Operations vs performance
4 of 28
Jisse Reitsma - Running Magento 2

Running Magento 2

Performance

5 of 28
Jisse Reitsma - Running Magento 2

Environment

  • PHP 7 + Zend OPcache
6 of 28
Jisse Reitsma - Running Magento 2

Environment

  • PHP 7 + Zend OPcache
  • Nginx + PHP-FPM
    • PHP-FPM via UNIX socket?
    • HTTP/2
7 of 28
Jisse Reitsma - Running Magento 2

Environment

  • PHP 7 + Zend OPcache
  • Nginx + PHP-FPM
  • Redis caching
    • Multiple Redis databases
8 of 28
Jisse Reitsma - Running Magento 2

Environment

  • PHP 7 + Zend OPcache
  • Nginx + PHP-FPM
  • Redis caching
  • MySQL 5.6 (or alternative) + tuning
    • Query cache, InnoDB buffers
9 of 28
Jisse Reitsma - Running Magento 2

Environment

  • PHP 7 + Zend OPcache
  • Nginx + PHP-FPM
  • Redis caching
  • MySQL 5.6 (or alternative) + tuning
10 of 28
Jisse Reitsma - Running Magento 2

Environment

  • PHP 7 + Zend OPcache
  • Nginx + PHP-FPM
  • Redis caching
  • MySQL 5.6 (or alternative) + tuning
  • composer / magerun2
    • Magerun2 addons from Hypernode: Patching, updates
11 of 28
Jisse Reitsma - Running Magento 2

Environment

  • PHP 7 + Zend OPcache
  • Nginx + PHP-FPM
  • Redis caching
  • MySQL 5.6 (or alternative) + tuning
  • composer / magerun2
  • CI tools
    • phpcs, phpmd, Phing/Capistrano/Fabric
12 of 28
Jisse Reitsma - Running Magento 2

Optionals

  • Varnish
    • VCL file generated through Magento 2
  • Clustering
    • MySQL master/slave, M2 EE
  • Offloading search
    • Solr, ElasticSearch
13 of 28
Jisse Reitsma - Running Magento 2

PHP 7

14 of 28
Jisse Reitsma - Running Magento 2

PHP 7

  • Hurray for Zend
15 of 28
Jisse Reitsma - Running Magento 2

PHP 7

  • Hurray for Zend
  • Ditch HHVM
16 of 28
Jisse Reitsma - Running Magento 2

PHP 7

  • Hurray for Zend
  • Ditch HHVM
  • Tune Zend OPcache
    • opcache.validate_timestamps=0 ?
    • Reload PHP-FPM instance after git pull
17 of 28
Jisse Reitsma - Running Magento 2

PHP 7

  • Hurray for Zend
  • Ditch HHVM
  • Tune Zend OPcache
  • Recompile PHP with PGO
    • PGO = Profile-Guided Optimization
18 of 28
Jisse Reitsma - Running Magento 2

PHP 7

  • Hurray for Zend
  • Ditch HHVM
  • Tune Zend OPcache
  • Recompile PHP with PGO
  • Enable huge_code_pages in kernel
    • Not page size of 4k but of 2m
19 of 28
Jisse Reitsma - Running Magento 2

Turning off

  • ionCube
20 of 28
Jisse Reitsma - Running Magento 2

Turning off

  • ionCube
  • Xdebug
20 of 28
Jisse Reitsma - Running Magento 2

Turning off

  • ionCube
  • Xdebug
  • NewRelic, Zend Z-Ray, Blackfire
20 of 28
Jisse Reitsma - Running Magento 2

Turning off

  • ionCube
  • Xdebug
  • NewRelic, Zend Z-Ray, Blackfire
  • MySQL performance schemas
20 of 28
Jisse Reitsma - Running Magento 2

Experimental

21 of 28
Jisse Reitsma - Running Magento 2

Experimental

  • appserver.io
    • Wait for 06/2016 release for PHP 7
21 of 28
Jisse Reitsma - Running Magento 2

Experimental

  • appserver.io
    • Wait for 06/2016 release for PHP 7
  • Tarantool or Aerospike instead of Redis
    • github.com/danslo/Rubic_Cache_Backend_Aerospike
21 of 28
Jisse Reitsma - Running Magento 2

Experimental

  • appserver.io
    • Wait for 06/2016 release for PHP 7
  • Tarantool or Aerospike instead of Redis
    • github.com/danslo/Rubic_Cache_Backend_Aerospike
  • Hack from HHVM
21 of 28
Jisse Reitsma - Running Magento 2

Running Magento 2

Operations

22 of 28
Jisse Reitsma - Running Magento 2

Magento 2 operations

  • No code generation of live server
    • Not running magento setup:di:compile
    • Committing var/generation and var/di to git?
23 of 28
Jisse Reitsma - Running Magento 2

Magento 2 operations

  • No code generation of live server
  • No composer updates on live server
    • Committing composer.lock to git (?)
    • Use prestissimo for faster downloads
    • Use Satis or Toran Proxy for offloading
    • Optimize autoload file (--optimize-autoloader)
24 of 28
Jisse Reitsma - Running Magento 2

Magento 2 operations

  • No code generation of live server
  • No composer updates on live server
  • Interceptors instead of event observers
    • Interceptor count matters less due to code generation
    • Count of dispatched events does matter
    • But events are less confusing than interceptors
25 of 28
Jisse Reitsma - Running Magento 2

Magento 2 operations

  • No code generation of live server
  • No composer updates on live server
  • Interceptors instead of event observers
  • How to analyse DI properly?
    • Preferences, types, virtual types, plugins
    • Circular dependencies reports do not help
    • magento-hackathon/magento2-plugin-visualization
26 of 28
Jisse Reitsma - Running Magento 2

Magento 2 operations

  • No code generation of live server
  • No composer updates on live server
  • Interceptors instead of event observers
  • How to analyse DI properly?
  • Deploying static view files
    • Use Grunt / Gulp instead
    • Specify what you want to deploy (PR @denisristic)
    • Other stuff we did on Monday
27 of 28
Jisse Reitsma - Running Magento 2

Thanks

Questions?

28 of 28
Jisse Reitsma - Running Magento 2

About me

  • Jisse Reitsma
2 of 28
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow