SlideShare a Scribd company logo
1 of 11
Download to read offline
Hosting Magento
 Performance and Stability
Typical Magento Cluster

 Web nodes
 Database servers
 Load balancers and cache servers

Some things to investigate before start:
1. Number of users
2. Hardware
3. Operating systems, hosting company
4. Session and cache storages (memcached, apc, etc.)
5. Does it make sense to use clouds or virtualization?
Web Nodes

Web nodes are CPU-bound, I/O is not very important
Code and images needs to be separated. Why NFS is a bad idea.
Use PHP accelerator (APC, eaccelerator, xcache)
The most important APC settings
Apache or nginx + fast CGI?
Dedicated image servers
Dedicated admin node
Session storage
Apache vs Nginx + FastCGI
Apache                                     nginx + FastCGI

+Pretty standard and well tested with      +   Static files are served very fast
Magento
                                           +  Clean architecture, application server
+   .htaccess support                      is separated from HTTP server

–   Using one fork per connection for      +  Ability to use built-in load balancing,
static and dynamic files (if prefork mpm   caching, reverse proxy and SSL
is in use)                                 offloading

– Uses a lot of memory for useless         + Nginx now hosts nearly 7.50%
functionality                              (20.5M) of all domains worldwide
Web Load Balancing Schemes

1. Nginx as HTTP server + for static files + apache as php
backends (reverse proxy scheme, mod_rpaf)
2. Nginx as HTTP server and load balancer + PHP scrips
using FastCGI protocol
3. Varnish as load balancer and proxy server for static
images, apache or nginx+fcgi as application nodes
4. Other options (hardware load balancers, ha-proxy,
lighthttpd, etc.)
PHP FastCGI Process Manager (PHP-FPM)

 Adaptive process spawning

 Basic statistics (ala Apache’s mod_status)

 Advanced process management with graceful stop/start

 Ability to start workers with different uid/gid/chroot

 Emergency restart in case of accidental opcode cache destruction

 Support for a “slowlog”

 And much more...
Session Storage

 Session handlers (file, memcache, memcached)

 Best options for single server and cluster

 Memcache – different clients (memcache, libmemcached)

 Problems with pecl-memcache 2.xx, session locking

 Other notes (replication)
MySQL Server

 Setup replication
 Use MySQL 5.1 + INNODB HA Plugin or 5.5 or Percona XtraDB server
 Use row based based replication (5.1+ only)
 Use big enough innodb pool
 Storage – different drives for the binary log and data, investigate
Solid State Drive (SSD)
 Do not forget to enable slow query log
 Setup realtime monitoring tools (mytop, innotop) before server goes
down
 Configure slave in Magento local.xml
 Do not use mysqldump on production servers
Monitoring

It is very important to setup monitoring before launching
the web service

 Nagios and CACTI – a perfect open source solution
 Services to monitor
   Apache (traffic, availability)
   MySQL (requests per count, replication, type of the requests,
 cache statistic, number of active connections, time of the longest reqest)
   Memcached (eviction count, hit rate)
   System: interface speed, I/O stat, CPU usage, etc.
 ATOP – powerful SA replacement, very recommended
 NFS shares if used
 More sensors...
Conclusion

 Most of the recommendations for Magento are typical for
any high-loaded AMP project

  Web is changing fast. It is recommended to investigate new
technologies and use modern tools

 It does make a sense to setup all monitoring tools before
any problems and do regular system audit

  Magento is always working to improve the speed and
provide new options for safe and reliable hosting
Thank you

More Related Content

What's hot

Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Atwix
 
Performance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra KumarPerformance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra Kumar
Swatantra Kumar
 
Breaking performance web rules
Breaking performance web rulesBreaking performance web rules
Breaking performance web rules
Pablo Moretti
 
Caching for J2ee Enterprise Applications
Caching for J2ee Enterprise ApplicationsCaching for J2ee Enterprise Applications
Caching for J2ee Enterprise Applications
Debajani Mohanty
 

What's hot (18)

Gab17 lyon SQL on Linux - David BARBARIN
Gab17 lyon SQL on Linux - David BARBARINGab17 lyon SQL on Linux - David BARBARIN
Gab17 lyon SQL on Linux - David BARBARIN
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
 
Memcache d
Memcache dMemcache d
Memcache d
 
Integrating GlusterFS with iSCSI Target
Integrating GlusterFS with iSCSI TargetIntegrating GlusterFS with iSCSI Target
Integrating GlusterFS with iSCSI Target
 
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
HBase
HBaseHBase
HBase
 
Performance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra KumarPerformance Optimization using Caching | Swatantra Kumar
Performance Optimization using Caching | Swatantra Kumar
 
Optimization_of_Virtual_Machines_for_High_Performance
Optimization_of_Virtual_Machines_for_High_PerformanceOptimization_of_Virtual_Machines_for_High_Performance
Optimization_of_Virtual_Machines_for_High_Performance
 
Premiers pas avec Ops Manager
Premiers pas avec Ops ManagerPremiers pas avec Ops Manager
Premiers pas avec Ops Manager
 
Optimize drupal
Optimize drupalOptimize drupal
Optimize drupal
 
Caching In Java- Best Practises and Pitfalls
Caching In Java- Best Practises and PitfallsCaching In Java- Best Practises and Pitfalls
Caching In Java- Best Practises and Pitfalls
 
Storage Monitoring in openATTIC - Monitoring Workshop - 2016-09-07
Storage Monitoring in openATTIC - Monitoring Workshop - 2016-09-07Storage Monitoring in openATTIC - Monitoring Workshop - 2016-09-07
Storage Monitoring in openATTIC - Monitoring Workshop - 2016-09-07
 
Postgres on OpenStack
Postgres on OpenStackPostgres on OpenStack
Postgres on OpenStack
 
Breaking performance web rules
Breaking performance web rulesBreaking performance web rules
Breaking performance web rules
 
Caching for J2ee Enterprise Applications
Caching for J2ee Enterprise ApplicationsCaching for J2ee Enterprise Applications
Caching for J2ee Enterprise Applications
 
Introducing MongoDB in a multi-site HA environment
Introducing MongoDB in a multi-site HA environmentIntroducing MongoDB in a multi-site HA environment
Introducing MongoDB in a multi-site HA environment
 
Webinar: StorPool and WHIR - better storage, better business
Webinar: StorPool and WHIR - better storage, better businessWebinar: StorPool and WHIR - better storage, better business
Webinar: StorPool and WHIR - better storage, better business
 

Viewers also liked

Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEOMagento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
varien
 
Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?
varien
 
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import ModuleMagento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
varien
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbs
varien
 
Best Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on MagentoBest Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on Magento
varien
 
Driving Business Innovation with Magento
Driving Business Innovation with MagentoDriving Business Innovation with Magento
Driving Business Innovation with Magento
varien
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Server
varien
 

Viewers also liked (9)

Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEOMagento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
Magento Imagine eCommerce, Day 1, Roy Rubin Co-Founder & CEO
 
Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?Magento Imagine Conference: With Friends Like These Who Needs Revenue?
Magento Imagine Conference: With Friends Like These Who Needs Revenue?
 
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with MagentoMagento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
Magento Imagine eCommerce Conference - February 2011 - Unit Testing with Magento
 
Magento Imagine eCommerce, Day 2, Yoav Kutner CTO
Magento Imagine eCommerce, Day 2, Yoav Kutner CTOMagento Imagine eCommerce, Day 2, Yoav Kutner CTO
Magento Imagine eCommerce, Day 2, Yoav Kutner CTO
 
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import ModuleMagento Imagine eCommerce Conference 2011: Using Magento's Import Module
Magento Imagine eCommerce Conference 2011: Using Magento's Import Module
 
Magento performancenbs
Magento performancenbsMagento performancenbs
Magento performancenbs
 
Best Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on MagentoBest Practices for Launching an Enterprise Business on Magento
Best Practices for Launching an Enterprise Business on Magento
 
Driving Business Innovation with Magento
Driving Business Innovation with MagentoDriving Business Innovation with Magento
Driving Business Innovation with Magento
 
Optimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend ServerOptimizing Magento Performance with Zend Server
Optimizing Magento Performance with Zend Server
 

Similar to Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Performance

Planning for-high-performance-web-application
Planning for-high-performance-web-applicationPlanning for-high-performance-web-application
Planning for-high-performance-web-application
Nguyễn Duy Nhân
 
WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.ppt
webhostingguy
 
Drupal Backend Performance and Scalability
Drupal Backend Performance and ScalabilityDrupal Backend Performance and Scalability
Drupal Backend Performance and Scalability
Ashok Modi
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
ColdFusionConference
 
Membase Meetup 2010
Membase Meetup 2010Membase Meetup 2010
Membase Meetup 2010
Membase
 

Similar to Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Performance (20)

Planning For High Performance Web Application
Planning For High Performance Web ApplicationPlanning For High Performance Web Application
Planning For High Performance Web Application
 
Planning for-high-performance-web-application
Planning for-high-performance-web-applicationPlanning for-high-performance-web-application
Planning for-high-performance-web-application
 
Performance_Up.ppt
Performance_Up.pptPerformance_Up.ppt
Performance_Up.ppt
 
WE18_Performance_Up.ppt
WE18_Performance_Up.pptWE18_Performance_Up.ppt
WE18_Performance_Up.ppt
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
 
Drupal Backend Performance and Scalability
Drupal Backend Performance and ScalabilityDrupal Backend Performance and Scalability
Drupal Backend Performance and Scalability
 
slides (PPT)
slides (PPT)slides (PPT)
slides (PPT)
 
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web serverNginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
 
DrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performanceDrupalCampLA 2011: Drupal backend-performance
DrupalCampLA 2011: Drupal backend-performance
 
Nginx pres
Nginx presNginx pres
Nginx pres
 
Drupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance SitesDrupalcamp Estonia - High Performance Sites
Drupalcamp Estonia - High Performance Sites
 
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusionAdvanced caching techniques with ehcache, big memory, terracotta, and coldfusion
Advanced caching techniques with ehcache, big memory, terracotta, and coldfusion
 
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...
Nagios Conference 2011 - Daniel Wittenberg -  Scaling Nagios At A Giant Insur...Nagios Conference 2011 - Daniel Wittenberg -  Scaling Nagios At A Giant Insur...
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...
 
High Performance Drupal Sites
High Performance Drupal SitesHigh Performance Drupal Sites
High Performance Drupal Sites
 
Experience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's ViewExperience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's View
 
High Performance Web Sites
High Performance Web SitesHigh Performance Web Sites
High Performance Web Sites
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
Sun Web Server Brief
Sun Web Server BriefSun Web Server Brief
Sun Web Server Brief
 
IT Operations for Web Developers
IT Operations for Web DevelopersIT Operations for Web Developers
IT Operations for Web Developers
 
Membase Meetup 2010
Membase Meetup 2010Membase Meetup 2010
Membase Meetup 2010
 

More from varien

Magento's Imagine eCommerce Conference: Do You Queue?
Magento's Imagine eCommerce Conference: Do You Queue?Magento's Imagine eCommerce Conference: Do You Queue?
Magento's Imagine eCommerce Conference: Do You Queue?
varien
 
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
varien
 
Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...
varien
 
Selecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce PlaformSelecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce Plaform
varien
 

More from varien (12)

Magento's Imagine eCommerce Conference: Do You Queue?
Magento's Imagine eCommerce Conference: Do You Queue?Magento's Imagine eCommerce Conference: Do You Queue?
Magento's Imagine eCommerce Conference: Do You Queue?
 
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
Magento Imagine eCommerce Conference:5 Way to Supercharge your Magento Enterp...
 
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
Magento Imgine eCommerce Conference February 2011: Mashup of Magento and Sale...
 
Best Practices for Magento Debugging
Best Practices for Magento Debugging Best Practices for Magento Debugging
Best Practices for Magento Debugging
 
Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...Getting from Here to There: How to assess your business, define an overall eC...
Getting from Here to There: How to assess your business, define an overall eC...
 
Magento Roy Rubin Amsterdam Presentation
Magento Roy Rubin Amsterdam PresentationMagento Roy Rubin Amsterdam Presentation
Magento Roy Rubin Amsterdam Presentation
 
Maximizing Magento: Getting the Most out of Multi-Store Management
Maximizing Magento: Getting the Most out of Multi-Store ManagementMaximizing Magento: Getting the Most out of Multi-Store Management
Maximizing Magento: Getting the Most out of Multi-Store Management
 
Maximizing Magento: Getting the Most out of Promotions
Maximizing Magento: Getting the Most out of PromotionsMaximizing Magento: Getting the Most out of Promotions
Maximizing Magento: Getting the Most out of Promotions
 
Vortrag über Magento auf der InternetWorld 2008
Vortrag über Magento auf der InternetWorld 2008Vortrag über Magento auf der InternetWorld 2008
Vortrag über Magento auf der InternetWorld 2008
 
Selecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce PlaformSelecting the 'Right' eCommerce Plaform
Selecting the 'Right' eCommerce Plaform
 
Magento eCommerce And The Next Generation Of PHP
Magento eCommerce And The Next Generation Of PHPMagento eCommerce And The Next Generation Of PHP
Magento eCommerce And The Next Generation Of PHP
 
Under the Radar Magento Presentation
Under the Radar Magento PresentationUnder the Radar Magento Presentation
Under the Radar Magento Presentation
 

Recently uploaded

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 

Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Performance

  • 2. Typical Magento Cluster Web nodes Database servers Load balancers and cache servers Some things to investigate before start: 1. Number of users 2. Hardware 3. Operating systems, hosting company 4. Session and cache storages (memcached, apc, etc.) 5. Does it make sense to use clouds or virtualization?
  • 3. Web Nodes Web nodes are CPU-bound, I/O is not very important Code and images needs to be separated. Why NFS is a bad idea. Use PHP accelerator (APC, eaccelerator, xcache) The most important APC settings Apache or nginx + fast CGI? Dedicated image servers Dedicated admin node Session storage
  • 4. Apache vs Nginx + FastCGI Apache nginx + FastCGI +Pretty standard and well tested with + Static files are served very fast Magento + Clean architecture, application server + .htaccess support is separated from HTTP server – Using one fork per connection for + Ability to use built-in load balancing, static and dynamic files (if prefork mpm caching, reverse proxy and SSL is in use) offloading – Uses a lot of memory for useless + Nginx now hosts nearly 7.50% functionality (20.5M) of all domains worldwide
  • 5. Web Load Balancing Schemes 1. Nginx as HTTP server + for static files + apache as php backends (reverse proxy scheme, mod_rpaf) 2. Nginx as HTTP server and load balancer + PHP scrips using FastCGI protocol 3. Varnish as load balancer and proxy server for static images, apache or nginx+fcgi as application nodes 4. Other options (hardware load balancers, ha-proxy, lighthttpd, etc.)
  • 6. PHP FastCGI Process Manager (PHP-FPM) Adaptive process spawning Basic statistics (ala Apache’s mod_status) Advanced process management with graceful stop/start Ability to start workers with different uid/gid/chroot Emergency restart in case of accidental opcode cache destruction Support for a “slowlog” And much more...
  • 7. Session Storage Session handlers (file, memcache, memcached) Best options for single server and cluster Memcache – different clients (memcache, libmemcached) Problems with pecl-memcache 2.xx, session locking Other notes (replication)
  • 8. MySQL Server Setup replication Use MySQL 5.1 + INNODB HA Plugin or 5.5 or Percona XtraDB server Use row based based replication (5.1+ only) Use big enough innodb pool Storage – different drives for the binary log and data, investigate Solid State Drive (SSD) Do not forget to enable slow query log Setup realtime monitoring tools (mytop, innotop) before server goes down Configure slave in Magento local.xml Do not use mysqldump on production servers
  • 9. Monitoring It is very important to setup monitoring before launching the web service Nagios and CACTI – a perfect open source solution Services to monitor Apache (traffic, availability) MySQL (requests per count, replication, type of the requests, cache statistic, number of active connections, time of the longest reqest) Memcached (eviction count, hit rate) System: interface speed, I/O stat, CPU usage, etc. ATOP – powerful SA replacement, very recommended NFS shares if used More sensors...
  • 10. Conclusion Most of the recommendations for Magento are typical for any high-loaded AMP project Web is changing fast. It is recommended to investigate new technologies and use modern tools It does make a sense to setup all monitoring tools before any problems and do regular system audit Magento is always working to improve the speed and provide new options for safe and reliable hosting