Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Oleh Kobchenko - Configure Magento 2 to get maximum performance

24,705 views

Published on

Magento 2 is qualitatively new product in world of e-commerce. Providing new opportunities for extensibility, configurability and scalability of your store M2 also brings list of performance improvements.
This presentation is devoted to main performance features available in product, their activation and usage.
Speaker dives into details on how to setup environment and Magento itself to get the best result in terms of page response and throughput.

Oleh Kobchenko - Configure Magento 2 to get maximum performance

  1. 1. © 2016 Magento, Inc. All rights reserved.
  2. 2. © 2016 Magento, Inc. Page | 2 Agenda 1 Environment Settings 2 Magento Deployment 3 Magento Configuration 4 Extended configuration 5 Testing performance 6 Scaling your store
  3. 3. © 2016 Magento, Inc. Page | 3© 2015 Environment settings Magento2 Environment Settings Magento Deployment Magento Configuration Extended Configuration Testing performance Scaling your store
  4. 4. © 2016 Magento, Inc. Page | 4 Environment Settings: Web Server is now officially supported [tested 1.7+] fully supported as before [tested 2.2+] configuration samples available: .htaccess.sample nginx.conf.sample Settings to pay attention: MaxClients and max_children_count
  5. 5. © 2016 Magento, Inc. Page | 5 Environment Settings: PHP Recommended list of extensions Sufficient memory_limit 768MB XDebug adds extra 20% to response time OpCache with recommended settings - Enough memory portion to fit the code [512MB] - Max_accelarated_files count [60000] - Timestamps validation / Consistency checks PHP7 is officially supported [tested on 7.0.3] PHP7 1.5x-3x profit [only with OpCache enabled] php-bcmath php-cli php-common php-gd php-intl php-mbstring php-mcrypt php-pdo php-soap php-xml
  6. 6. © 2016 Magento, Inc. Page | 6 Environment Settings: DB server MySQL: Oracle and Percona versions are supported [tested on 5.6.x] Default buffer_size / pool_size / connections / memory_limits settings are OK Megento 2 Whitepaper clearly regulates recommendations on high load
  7. 7. © 2016 Magento, Inc. Page | 7© 2015 Magento deployment Magento2 Environment Settings Magento Deployment Magento Configuration Extended Configuration Testing performance Scaling your store
  8. 8. © 2016 Magento, Inc. Page | 8 Deployment: Steps Actions to perform after installation: Step 1: Deploy of static content Step 2: DI instructions preprocessing Step 3: Magento Mode selection
  9. 9. © 2016 Magento, Inc. Page | 9 Deployment: Static content bin/magento setup:static-content:deploy What happens inside? How much time does it save?
  10. 10. © 2016 Magento, Inc. Page | 10 Deployment: Compilation bin/magento setup:di:compile What happens inside? How much time saved?
  11. 11. © 2016 Magento, Inc. Page | 11 Deployment: Mode selection Developer Default Production .htaccess or nginx.conf
  12. 12. © 2016 Magento, Inc. Page | 12© 2015 Magento configuration Magento2 Environment Settings Magento Deployment Magento Configuration Extended Configuration Testing performance Scaling your store
  13. 13. © 2016 Magento, Inc. Page | 13 Configuration: Server side features Indexers activation Flat Product and Flat Category index Indexers mode [Update on Schedule] Caches activation Page Cache [Varnish] Asynchronous emailing for Checkout / Order Management Asynchronous OMS grid indexing
  14. 14. © 2016 Magento, Inc. Page | 14 Configuration: Client side features Minification (CSS, JS, HTML) JS resources bundling Caching of static content Images compression bin/magento catalog:images:resize
  15. 15. © 2016 Magento, Inc. Page | 15© 2015 Extended configuration Magento2 Environment Settings Magento Deployment Magento Configuration Extended Configuration Testing performance Scaling your store
  16. 16. © 2016 Magento, Inc. Page | 16 Extended configuration: Page Cache recommended for Page Cache [tested on 3.x & 4.x] available in both CE + EE Fast response, less load on server Varnish sample configuration file available Build-in PageCache is only for development purposes
  17. 17. © 2016 Magento, Inc. Page | 17 Extended configuration: Cache single web-node installation local cache storage RAM FS to get up to 30% improve several web-nodes installation Redis as cache storage sufficient network channel
  18. 18. © 2016 Magento, Inc. Page | 18 Extended configuration: Search recommended for search [tested on 4.x] available only in EE SOLR sample configuration file available 0 5 10 15 20 25 -200000 0 200000 400000 600000 800000 1000000 1200000 Seconds Records found MySQL SOLR
  19. 19. © 2016 Magento, Inc. Page | 19 Extended configuration: Job Queue integration with RabbitMQ available only in EE version asynchronous jobs execution Deferred stock update … more actions on the way Recommended for 3PD extensions
  20. 20. © 2016 Magento, Inc. Page | 20© 2015 Testing performance Magento2 Environment Settings Magento Deployment Magento Configuration Extended Configuration Testing performance Scaling your store
  21. 21. © 2016 Magento, Inc. Page | 21 Testing: Pre-launch steps Indexation process bin/magento indexer:reindex Cache cleaning bin/magento cache:clean bin/magento cache:flush Cache warm up tool is on the way
  22. 22. © 2016 Magento, Inc. Page | 22 Testing: Server side tools Profiling toolkit [JMeter based] Representable Benchmark scenario Profile generator 3 profiles size [small, medium, large] bin/magento setup:performance:generate-fixtures
  23. 23. © 2016 Magento, Inc. Page | 23 Testing: Client side tools WebPageTest all aspects of page load time resources count and size Yslow by PhantomJS PageSpeed by Google optimization recommendations
  24. 24. © 2016 Magento, Inc. Page | 24 Testing: Profiling instruments ZRay by Zend Magento 2 plugin already available in gallery
  25. 25. © 2016 Magento, Inc. Page | 25© 2015 Scaling your store Magento2 Environment Settings Magento Deployment Magento Configuration Extended Configuration Testing performance Scaling your store
  26. 26. © 2016 Magento, Inc. Page | 26 Scaling: Out of the box opportunities Scalability area Community Edition (CE) Enterprise Edition (EE) Web servers Y Y Media servers Y Y Caching system Y Y Database scalability Y Search Y Job queue Y
  27. 27. © 2016 Magento, Inc. Page | 27 Scaling: DB solutions (CE) Community version: Single database to addresses CE load Simplified data access / connection Easy setup on hosting Single Master DB
  28. 28. © 2016 Magento, Inc. Page | 28 Scaling: DB solutions (EE) Enterprise version: A number of possible configurations Up to 3 masters for separate business domains Opportunity to have slave DBs for each master Checkout and OMS databases compatible with MySQL Cluster Web servers Automatic connection resolving (CQRS pattern) Main (Catalog) Master Main Slave Checkout Master Order MS Master Catalog Slave Checkout Slave EAV Slave …
  29. 29. © 2016 Magento, Inc. Page | 29 Scaling: Adding more databases Adding slave database for resource: bin/magento setup:db-schema:add-slave Moving specific domain to separate master database bin/magento setup:db-schema:split-quote bin/magento setup:db-schema:split-sales
  30. 30. © 2016 Magento, Inc. Page | 30 Scaling: Deployment example Web server Database Session server Caching server Caching server & Reverse Proxy Balancer Search server Application server Job queue server Job server Job server Media server Web server Web server… Database Database… … Caching server …
  31. 31. © 2016 Magento, Inc. Page | 31© 2015 Q & A Magento2 Environment Settings Magento Deployment Magento Configuration Extended Configuration Testing performance Scaling your store

×