Your SlideShare is downloading. ×
0
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Methods and Best Practices for High Performance eCommerce
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Methods and Best Practices for High Performance eCommerce

14,849

Published on

Magento HQ Developers Meet up, Los Angeles, September 16

Magento HQ Developers Meet up, Los Angeles, September 16

Published in: Technology
0 Comments
14 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
14,849
On Slideshare
0
From Embeds
0
Number of Embeds
12
Actions
Shares
0
Downloads
246
Comments
0
Likes
14
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Magento HQ Developers Meet up<br />Methods and Best Practices for High Performance eCommerce.<br />By Dmitriy Soroka<br />System Architect at Magento, Inc<br />20-Sep-10|<br />1|<br />
  • 2. Performance Improvement Techniques <br />Environment<br />Web Server Configuration<br />Data Base Configuration<br />Accelerating PHP<br />Additional HTTP Requests<br />Application<br />Caching<br />Session Handling<br />More options<br />Scaling<br />Backend Server<br />Multiple Frontend Servers<br />Multiple Databases<br />3rd party integrations<br />Integration with Solr<br />
  • 3. Benchmarks Methodology<br />Siege with different concurrencies<br />10, 20, 50, 100<br />Database Size<br />Sample data, 10K products, 80K products<br />URLs<br />CMS Page (home page)<br />URLs List<br />Checkout<br />Results<br />Requests per second<br />Orders per hour<br />
  • 4. Environment optimization<br />Apache, MySQL, PHP<br />
  • 5. Apache Configuration<br />Apache modules – use just necessary modules<br />KeepAlive directive<br />mod_deflate - compress content before sending it to the browser<br />Eliminating directory structure scans for the .htaccess<br />
  • 6. MySQL Configuration<br />innodb_buffer_pool_size<br />Combined web and db server, 6 GB RAM – 2-3 GB<br />Dedicated database server, 6 GB RAM – 5 GB<br />Dedicated database server, 12 GB RAM – 10 GB<br />innodb_thread_concurrency<br />2 * [numberofCPUs] + 2<br />table_cache is the number of tables that can be simultaneously opened by MySQL<br />query_cache_size (64 Mb)<br />query_cache_limit (2 Mb)<br />
  • 7. Optimization Results<br />
  • 8. Accelerating PHP<br />File system structure optimization<br />APC<br />eAccelerator<br />Zend Optimize<br />Xcache<br />
  • 9. Magento Compiler<br />
  • 10. PHP Accelerators<br />
  • 11. Additional HTTP Requests<br />CSS<br />Java Script<br />Images<br />
  • 12. Application optimization <br />Cache, Sessions<br />
  • 13. Cache Types<br />
  • 14. Cache Enables vs. Cache disabled<br />
  • 15. Cache Storages<br />Memory Based<br />File System Based<br /><ul><li>File
  • 16. Sqlite
  • 17. Database (MySQL)
  • 18. ZendServer disk
  • 19. APC
  • 20. Memcached
  • 21. xCache
  • 22. eAccelerator
  • 23. ZendServer Memory</li></li></ul><li>Two Levels Backend<br />Two Levels Backend<br />Slow level<br />Fast level<br />
  • 24. Cache Configuration<br />&lt;config&gt;<br /> &lt;global&gt; <br /> &lt;cache&gt;<br />&lt;!-- apc / memcached / xcache / empty=file --&gt;<br /> &lt;backend&gt;&lt;/backend&gt;<br /> &lt;prefix|id_prefix&gt;&lt;/prefix|id_prefix&gt;<br /> &lt;backend_options&gt;<br /> &lt;option_code1&gt;option_value1&lt;/option_code1&gt;<br /> &lt;/backend_options&gt;<br /> &lt;frontend_options&gt;<br /> &lt;option_code1&gt;option_value1&lt;/option_code1&gt;<br /> &lt;/frontend_options&gt;<br /> &lt;memcached&gt;<br /> &lt;servers&gt;....&lt;/servers&gt;<br /> &lt;memcached&gt;<br /> &lt;/cache&gt;<br /> &lt;/global&gt;<br />&lt;/config&gt;<br />
  • 25. Slow Backend<br />&lt;config&gt;<br /> &lt;global&gt; <br /> &lt;cache&gt;<br /> &lt;slow_backend&gt;database&lt;/slow_backend&gt;<br /> &lt;slow_backend_options&gt;<br /> &lt;option_code1&gt;option_value1&lt;/option_code1&gt;<br /> &lt;/slow_backend_options&gt;<br /> &lt;/cache&gt;<br /> &lt;/global&gt;<br />&lt;/config&gt;<br />
  • 26. Storages Benchmark<br />
  • 27. Full Page Cache (CMS page)<br />
  • 28. Full Page Cache (urls list)<br />
  • 29. Session Storage<br />Files Memcached Data Base<br />
  • 30. More…<br />Flat Catalog<br />Sales Archive<br />Backend processes (cron, indexes)<br />Theme complexity<br />
  • 31. scaling<br />Hardware, Web Nodes, Data Base<br />
  • 32. Hardware<br />
  • 33. Separate Backend Server<br />Data Base<br />Handle admin users<br />Process backend activity (cron)<br />Pre generate Full Page Cache<br />Handle media queries<br />
  • 34. Multiple Web Nodes (browsing)<br />
  • 35. Multiple Web Nodes (checkout)<br />
  • 36. Data Base<br />config/global/resources<br /> &lt;default_setup&gt;<br /> &lt;connection&gt;<br /> &lt;host&gt;&lt;![CDATA[master]]&gt;&lt;/host&gt;<br /> &lt;username&gt;&lt;![CDATA[writeuser]]&gt;&lt;/username&gt;<br /> &lt;password&gt;&lt;![CDATA[writeuserpwd]]&gt;&lt;/password&gt;<br /> &lt;dbname&gt;&lt;![CDATA[magento]]&gt;&lt;/dbname&gt;<br /> &lt;active&gt;1&lt;/active&gt;<br /> &lt;/connection&gt;<br /> &lt;/default_setup&gt;<br /> &lt;default_read&gt;<br /> &lt;connection&gt;<br /> &lt;use&gt;&lt;/use&gt;<br /> &lt;host&gt;&lt;![CDATA[slave]]&gt;&lt;/host&gt;<br /> &lt;username&gt;&lt;![CDATA[readuser]]&gt;&lt;/username&gt;<br /> &lt;password&gt;&lt;![CDATA[readuserpwd]]&gt;&lt;/password&gt;<br /> &lt;dbname&gt;&lt;![CDATA[magento]]&gt;&lt;/dbname&gt;<br /> &lt;model&gt;mysql4&lt;/model&gt;<br /> &lt;initStatements&gt;SET NAMES utf8&lt;/initStatements&gt;<br /> &lt;type&gt;pdo_mysql&lt;/type&gt;<br /> &lt;active&gt;1&lt;/active&gt;<br /> &lt;/connection&gt;<br /> &lt;/default_read&gt;<br />
  • 37. 3rd party integrations<br />Solr<br />
  • 38. Using solr<br />Spell checking<br />Search suggestions<br />Morphology<br />Category navigation<br />Facet navigation<br />
  • 39. Benchmark Results<br />
  • 40. Magento HQ Developers Meet up<br />Thank You<br />Email: dmitriy.soroka@varien.com<br />
  • 41. Q&amp;A<br />

×