Drupal commerce performance profiling and tunning using loadstorm experiments drupal mid camp...
-
Upload
andrew-kucharski -
Category
Technology
-
view
2.448 -
download
0
description
Transcript of Drupal commerce performance profiling and tunning using loadstorm experiments drupal mid camp...
Promet Source MidCamp 2104 Stress testing and optimizing a
Drupal Commerce on a LAMP stack
Objectives• Stress Test Drupal Commerce on a standard server• Make a performance improvement• Measure results & Repeat
• How to look at stress test results• Which improvements made the biggest impact
What You’ll Learn
About Andy
• @AKUCHARSKI• PROMET SOURCE FOUNDER• @PROMETSOURCE
About Promet• Focus on Drupal
•CMS platform•Web applications•Systems integration
• Practice areas•Agile Development (Scrum, Kanban)•DevOps (cook with Chef)•Support (cover 24x7)•Mobile (build native apps)
• Founded in 2003• Global team
•30+ “Prometsters”
What Load Testing is not
http://www.flickr.com/photos/peterlozano
• Front End Performance Testing• High Availability Analysis
Why Load Test•Capacity Planning•Capacity Testing•Performance Tuning
Why care about performance?
Google Blog: 2011 – “We encourage you to start looking at your site’s speed— not only to improve your ranking in search engines, but also to improve everyone’s experience on the Internet. “
• Time = Money… • Speed = Money…• Slower Page load = Less Money
HTML DELAY EXPERIMENT
Determine impact of server delays
GOAL
Delay before sending HTML page Different experiments with different
delays Small % of traffic Monitor negative impact
METHODOLOGY
• LoadStorm.com is a load testing tool for websites• Test scenarios such as login, e-commerce• No scripting language needed• Run large tests up to 500,000 concurrent users• No download, no install, no servers to buy
Waterfall diagrams
•X = Time•Y = Number of objects on page
•Y(1) = HTTP Request – rest of objects are elements of the page, images, CSS and js files, etc, etc.
•Time to load all elements
•DNS Lookup – time it takes for browser to find the server•Initial Connection – three way handshake, hard to control•Time to First Byte – server wait time•Content Download – how long it takes to transfer the data from server to browser
• Back End
• Front End
• Render Start
• Render complete
The Victim – 37 objects on home page
Click icon to add picture
Click icon to add picture
Load Storm Hierarchy
PLAN
SCENARIO
STEPS
Test Plan
Script #1 Activity (User browses anonymously) (11%)1. VUser hits the homepage2. VUser goes to category #13. VUser goes to product #1 in category #14. VUser goes to category #25. VUser goes to product #2 in category #26. VUser goes to category #37. VUser goes to product #3 in category #38. End of session
Script #2 Activity (User browses after logging in) (10%)1. VUser hits the homepage2. VUser logs into an existing customer account3. VUser goes to category #14. VUser goes to product #1 in category #15. VUser goes to category #26. VUser goes to product #2 in category #27. VUser goes to category #38. VUser goes to product #3 in category #39. VUser logs out10. End of session
Test Plan
Script #3 Activity (User abandons a cart, requires login) (68% [2])1. VUser hits homepage2. VUser logs into an existing customer account3. VUser goes to category #14. VUser goes to product #2 in category #15. VUser adds that product to her cart6. VUser removes that product from her cart7. VUser logs out8. End of session
Script #4 Activity (User purchases a product, requires login) (3% [1])1. VUser hits homepage2. VUser logs into an existing customer account3. VUser goes to category #14. VUser goes to product #3 in category #15. VUser adds that product to her cart6. VUser reviews cart7. VUser goes through the checkout process8. VUser receives order confirmation9. VUser logs out10. End of session
Target: AWS Large
Target
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Baseline
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Baseline
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Baseline
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Baseline
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Baseline
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Baseline
Choke Point – around 300 users
• Standard LAMP Stack• Drupal Commerce • Drupal Cache On
Drupal Cache!
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
D.Cache
Choke Point – around 300 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Drupal Cache!
Choke Point – around 300 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Drupal Cache!
Choke Point – around 300 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Drupal Cache!
Choke Point – around 300 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Drupal Cache!
Choke Point – around 350 users
• Standard LAMP Stack• Drupal Commerce • Drupal Cache On + CSS +
JSC Aggregation
D.Cache + Agg
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
D.Cache + Agg
Choke Point – around 350 users
• Standard LAMP Stack• Drupal Commerce • Drupal Cache On + CSS +
JSC Aggregation
D.Cache + Agg
Choke Point – around 350 users
• Standard LAMP Stack• Drupal Commerce • Drupal Cache On + CSS +
JSC Aggregation
D.Cache + Agg
Choke Point – around 360 users
• Standard LAMP Stack• Drupal Commerce • Drupal Cache + Views
Cache
Views Cache
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Views Cache
Choke Point – around 360 users
• Standard LAMP Stack• Drupal Commerce • Drupal Cache + Views
Cache
Views Cache
Choke Point – around 360 users
• Standard LAMP Stack• Drupal Commerce • Drupal Cache + Views
Cache
Views Cache
Choke Point – around 450 users
• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy
Reverse Proxy (nginx)
Choke Point – around 100 users
• Standard LAMP Stack• Drupal Commerce
Kickstart out of the box, no caching turned on
Reverse Proxy
Choke Point – around 450 users
• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy
Reverse Proxy (nginx)
Choke Point – around 450 users
• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy
Reverse Proxy (nginx)
Choke Point – around 450 users
• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy
Reverse Proxy (nginx)
Choke Point – around 450 users
• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy
Reverse Proxy (nginx)
LIVE DEMO
Pt_query_digest
Pt_query_digest
[email protected]+1.773.525.8255@akucharski@prometsource