Running Magento 2 - Create Hosting · Difference between running from running Operations vs...
Transcript of Running Magento 2 - Create Hosting · Difference between running from running Operations vs...
![Page 1: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/1.jpg)
Running Magento 2
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 2: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/2.jpg)
About meJisse Reitsma
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 3: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/3.jpg)
About meJisse Reitsma
Founder and lead developer of Yireo
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 4: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/4.jpg)
About meJisse Reitsma
Founder and lead developer of Yireo
Wrote 2 developer books for J**ml*
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 5: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/5.jpg)
About meJisse Reitsma
Founder and lead developer of Yireo
Wrote 2 developer books for J**ml*
Grab a MUGMUG
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 6: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/6.jpg)
About meJisse Reitsma
Founder and lead developer of Yireo
Wrote 2 developer books for J**ml*
Grab a MUGMUG
Part of Zend Z-Team
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 7: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/7.jpg)
About meJisse 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
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 8: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/8.jpg)
About meJisse 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
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 9: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/9.jpg)
The palace
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 10: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/10.jpg)
Disclaimers
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 11: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/11.jpg)
DisclaimersI do not live in a palace
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 12: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/12.jpg)
DisclaimersI do not live in a palace
I am not a runner
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 13: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/13.jpg)
DisclaimersI do not live in a palace
I am not a runner
I am just a simple Dutch guy
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 14: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/14.jpg)
DisclaimersI do not live in a palace
I am not a runner
I am just a simple Dutch guy
Difference between running from runningOperations vs performance
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 15: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/15.jpg)
Running Magento 2Performance
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 16: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/16.jpg)
EnvironmentPHP 7 + Zend OPcache
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 17: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/17.jpg)
EnvironmentPHP 7 + Zend OPcache
Nginx + PHP-FPMPHP-FPM via UNIX socket?
HTTP/2
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 18: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/18.jpg)
EnvironmentPHP 7 + Zend OPcache
Nginx + PHP-FPM
Redis cachingMultiple Redis databases
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 19: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/19.jpg)
EnvironmentPHP 7 + Zend OPcache
Nginx + PHP-FPM
Redis caching
MySQL 5.6 (or alternative) + tuningQuery cache, InnoDB buffers
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 20: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/20.jpg)
EnvironmentPHP 7 + Zend OPcache
Nginx + PHP-FPM
Redis caching
MySQL 5.6 (or alternative) + tuning
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 21: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/21.jpg)
EnvironmentPHP 7 + Zend OPcache
Nginx + PHP-FPM
Redis caching
MySQL 5.6 (or alternative) + tuning
composer / magerun2Magerun2 addons from Hypernode: Patching, updates
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 22: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/22.jpg)
EnvironmentPHP 7 + Zend OPcache
Nginx + PHP-FPM
Redis caching
MySQL 5.6 (or alternative) + tuning
composer / magerun2
CI toolsphpcs, phpmd, Phing/Capistrano/Fabric
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 23: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/23.jpg)
OptionalsVarnish
VCL file generated through Magento 2
ClusteringMySQL master/slave, M2 EE
Offloading searchSolr, ElasticSearch
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 24: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/24.jpg)
PHP 7
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 25: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/25.jpg)
PHP 7Hurray for Zend
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 26: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/26.jpg)
PHP 7Hurray for Zend
Ditch HHVM
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 27: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/27.jpg)
PHP 7Hurray for Zend
Ditch HHVM
Tune Zend OPcacheopcache.validate_timestamps=0 ?
Reload PHP-FPM instance after git pull
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 28: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/28.jpg)
PHP 7Hurray for Zend
Ditch HHVM
Tune Zend OPcache
Recompile PHP with PGOPGO = Profile-Guided Optimization
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 29: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/29.jpg)
PHP 7Hurray for Zend
Ditch HHVM
Tune Zend OPcache
Recompile PHP with PGO
Enable huge_code_pages in kernelNot page size of 4k but of 2m
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 30: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/30.jpg)
Turning offionCube
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 31: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/31.jpg)
Turning offionCube
Xdebug
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 32: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/32.jpg)
Turning offionCube
Xdebug
NewRelic, Zend Z-Ray, Blackfire
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 33: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/33.jpg)
Turning offionCube
Xdebug
NewRelic, Zend Z-Ray, Blackfire
MySQL performance schemas
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 34: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/34.jpg)
Experimental
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 35: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/35.jpg)
Experimentalappserver.io
Wait for 06/2016 release for PHP 7
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 36: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/36.jpg)
Experimentalappserver.io
Wait for 06/2016 release for PHP 7
Tarantool or Aerospike instead of Redisgithub.com/danslo/Rubic_Cache_Backend_Aerospike
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 37: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/37.jpg)
Experimentalappserver.io
Wait for 06/2016 release for PHP 7
Tarantool or Aerospike instead of Redisgithub.com/danslo/Rubic_Cache_Backend_Aerospike
Hack from HHVM
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 38: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/38.jpg)
Running Magento 2Operations
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 39: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/39.jpg)
Magento 2 operationsNo code generation of live server
Not running magento setup:di:compile
Committing var/generation and var/di to git?
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 40: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/40.jpg)
Magento 2 operationsNo code generation of live server
No composer updates on live serverCommitting composer.lock to git (?)
Use prestissimo for faster downloads
Use Satis or Toran Proxy for offloading
Optimize autoload file (‐‐optimize‐autoloader)
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 41: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/41.jpg)
Magento 2 operationsNo code generation of live server
No composer updates on live server
Interceptors instead of event observersInterceptor count matters less due to code generation
Count of dispatched events does matter
But events are less confusing than interceptors
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 42: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/42.jpg)
Magento 2 operationsNo 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
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 43: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/43.jpg)
Magento 2 operationsNo code generation of live server
No composer updates on live server
Interceptors instead of event observers
How to analyse DI properly?
Deploying static view filesUse Grunt / Gulp instead
Specify what you want to deploy (PR @denisristic)
Other stuff we did on Monday
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com
![Page 44: Running Magento 2 - Create Hosting · Difference between running from running Operations vs performance Jisse Reitsma - Running Magento 2 ... PHP 7 + Zend OPcache Jisse Reitsma -](https://reader030.fdocuments.in/reader030/viewer/2022041013/5ec38d0f4ea3634ab929c313/html5/thumbnails/44.jpg)
ThanksQuestions?
Jisse Reitsma - Running Magento 2
Yireo - slides.yireo.com