everything you wanted to know about magento performance...
TRANSCRIPT
Everything you wanted to know about Magento performance but were afraid to ask The guide from the Magento Expert Consulting Group for holiday season preparation Magento Expert Consulting Group Webinar October 24, 2012
Agenda
2 October 24, 2012
About the presenters What you should expect this Holiday season The mechanisms that power Magento performance Before the storm: Preparing your store for peak traffic
– Environment – Application
During the storm: Operating your store under peak traffic
Q&A and Contact Information
About the presenters
Udi Shamay Head Magento Expert Consulting Group
Steve Kukla Project Manager/Business Analyst Magento Expert Consulting Group
Alexey Samorukov Senior System Administrator Magento Expert Consulting Group
3 October 24, 2012
17.73%
0.88%
1.19%
2.29%
9.77%
68.14%
2011 Online Holiday Sales Nov 1 - 20
ThanksgivingDayBlack Friday
Cyber Monday
Dec 19 - Jan 1
All other daysNov 21 - Dec 31
Source: eMarketer.com
What you should expect: 2011 Holiday Season Breakdown
4 October 24, 2012
$1.25 billion spent online Biggest online spending day in history 10 million people purchased online
What you should expect: Cyber Monday US, 2011
5 October 24, 2012
Metrics: Cyber Monday 2011 Average day (2011)
Items Per Order 7.31 5.22
Average Order Value $198.26 $141.6
Conversion Rate 5.71% 4.1%
New Visitor Conversion Rate 4.39% 3.13%
Average Session Length 7:30 5:35
Browsing Sessions 46.90% 33.5%
Page Views Per Session 7.74 5.5
Product Views Per Session 1.73 1.2
What you should expect: Cyber Monday 2011 vs. Average Day 2011
6 October 24, 2012
What you should expect: YOY Growth for Holiday Season Sales
In 2012, $54.5 billion in online Holiday sales will account for 23% of total online sales in 2012.
Source: eMarketer.com
7 October 24, 2012
Mechanisms that power Magento performance Peak vs. Normal Load
8
Peak time Normal traffic
October 24, 2012
What you should expect: The challenges of peak traffic
Risks • Application bottlenecks
• Database overload
• Page Load Latency
Consequences • Server failure
• Website Downtime
• Bad customer experience
• Loss of business
9 October 24, 2012
Mechanisms that power Magento Application Performance
10
Indexing: Instead of getting the data from multiple tables… read from one table that has just the info you need
Tier Price
Cost
Price
Weight
SRP Special Price
Short Desc Long Desc
Name Color
SKU Size
Tier Price
Special Price
Short Desc Long Desc
Cost
Price
Name
Weight
Color
SRP
SKU Size
October 24, 2012
Mechanisms that power Magento Application Performance
Caching: Instead of assembling all the different elements which make up a page each time – store and load the assembled page
11 October 24, 2012
Preparing your store for peak traffic Application
Cron Jobs
Cache management
Index Management
Catalog Management
Promotion Management
Order Management
12 October 24, 2012
Preparing your store for peak traffic Application – Cron jobs
Schedule Magento cron jobs for off-business hours
Don’t schedule resource-heavy actions at the same time.
13 October 24, 2012
Preparing your store for peak traffic Application – Cache Management
14 October 24, 2012
Preparing your store for peak traffic Application – Index Management
15 October 24, 2012
Preparing your store for peak traffic Application – Catalog Management
Make room in your database: 1. Remove outdated products and categories 2. Remove invalid promotions and consolidate their logic 3. Use mass actions wherever possible
16 October 24, 2012
Preparing your store for peak traffic Application – Promotion Management
17 October 24, 2012
Preparing your store for peak traffic Application – Promotion Management
18 October 24, 2012
Preparing your store for peak traffic Application – Promotion Management
19 October 24, 2012
Preparing your store for peak traffic Application – Promotion Management
October 24, 2012 20
Preparing your store for peak traffic Application – Order Management
21 October 24, 2012
Preparing your store for peak traffic Environment
Load Balancer
APC Accelerator
Cache Storage
External Caching
Database Replication
Monitoring and Graphing
Load Testing
22 October 24, 2012
Preparing your store for peak traffic Environment – Load Balancer
Need new content (Visual/definition/how it helps)
• load balancer is a software/hardware
solution that distributes the load
between your servers.
• Makes scaling possible
• Removes single point of failure
23 October 24, 2012
Preparing your store for peak traffic Environment – APC Accelerator
Need new content (Visual/definition/how it helps)
• APC accelerator - Caches and
optimizes your PHP code for
faster page response times.
• Could also be used as
alternative storage for
Magento cache
24 October 24, 2012
Preparing your store for peak traffic Environment – Cache Storage
Need new content (Visual/definition/how it helps)
• Cache storage - is a place for storing
your Magento application cache.
• Different cache storage options are
available – APC, memcached,
filesystem, sqlite
• For deployments with a large catalog
and multiple stores we recommend
trying REDIS server.
25 October 24, 2012
Preparing your store for peak traffic Environment – External Caching
Need new content (Visual/definition/how it helps)
• CDN - A content delivery network (CDN) is a network of servers
deployed around the world serving images, files, etc.
• A CDN helps to ensure that content is delivered to clients from a
source which is physically closest to them
26 October 24, 2012
Preparing your store for peak traffic Environment – External Caching
Need new content (Visual/definition/how it helps)
• Reverse proxy software allows you to store your cached content separately from the application. The most popular solutions used with Magento are Varnish and ngnix.
• Separate servers and subdomains can be used for images, styles, JavaScript and other content.
27 October 24, 2012
Preparing your store for peak traffic Environment – Database Replication
Need new content (Visual/definition/how it helps)
• Database Replication helps reduce
load on your primary database server
and allows your site to serve more
visitors at one time.
• Replication can also be used for
backing up the database without
affecting site performance as well as for
high availability configurations.
28 October 24, 2012
• Monitoring software constantly scans your servers gives you an overall picture of your system’s performance and health.
• Use monitoring in addition to what your hosting provider offers you. • Graphing helps you find typical load patterns. It is also very useful for
understanding your system’s behavior at different times of the day before the holiday season.
• We have had success using Cacti for graphing and Nagios for monitoring.
Preparing your store for peak traffic Environment – Monitoring and Graphing
29 October 24, 2012
Preparing your store for peak traffic Environment – Load Testing
• Load testing is the process of putting demand
on a system or device and measuring its
response.
• Load testing is performed to determine a
system’s behavior under both normal and
anticipated peak load conditions.
30 October 24, 2012
During the storm: Operating your store under peak traffic
Top Tips To Keep In Mind
• Avoid massive updates such as importing/exporting products or
database backups during business hours
• Monitor your system and customer activity
• Don’t flush your cache during peak traffic
• When updating your catalog, switch indexes to manual mode
• Make sure you time cron jobs to run after business hours or
during periods of low traffic
• Make sure you can scale quickly
31 October 24, 2012
Wrapping up Questions and Contact
Q&A
Contact • Udi Shamay: [email protected] • Steve Kukla: [email protected] • Alexey Samorukov: [email protected] http://www.magentocommerce.com/consulting
32 October 24, 2012