49
Promet Source MidCamp 2104 Stress testing and optimizing a Drupal Commerce on a LAMP stack

Drupal commerce performance profiling and tunning using loadstorm experiments drupal mid camp chicago 2014

Embed Size (px)

DESCRIPTION

Drupal commerce performance profiling by load testing a the kickstarter drupal commerce site on an AWS instance and comparing how the site performa after several well known performance tuning enhancements are applied. We try to compare performance improvements after druapl cache, aggregation, varnish, and nginx reverse proxy. This presentation was first given at Drupal Mid Camp in Chicago. We used loadstorm and new relic to analyze results.

Citation preview

Page 1: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Promet Source MidCamp 2104 Stress testing and optimizing a

Drupal Commerce on a LAMP stack

Page 2: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

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

Page 3: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

About Andy

• @AKUCHARSKI• PROMET SOURCE FOUNDER• @PROMETSOURCE

Page 4: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

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”

Page 5: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

What Load Testing is not

http://www.flickr.com/photos/peterlozano

• Front End Performance Testing• High Availability Analysis

Page 6: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Why Load Test•Capacity Planning•Capacity Testing•Performance Tuning

Page 7: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

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

Page 8: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

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

Page 9: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014
Page 10: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014
Page 11: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

• 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

Page 12: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

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

Page 13: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

•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

Page 14: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

• Back End

• Front End

• Render Start

• Render complete

Page 15: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

The Victim – 37 objects on home page

Click icon to add picture

Page 16: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Click icon to add picture

Load Storm Hierarchy

PLAN

SCENARIO

STEPS

Page 17: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

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

Page 18: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

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

Page 19: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Target: AWS Large

Page 20: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Target

Page 21: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Baseline

Page 22: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Baseline

Page 23: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Baseline

Page 24: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Baseline

Page 25: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Baseline

Page 26: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Baseline

Page 27: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 300 users

• Standard LAMP Stack• Drupal Commerce • Drupal Cache On

Drupal Cache!

Page 28: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

D.Cache

Page 29: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 300 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Drupal Cache!

Page 30: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 300 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Drupal Cache!

Page 31: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 300 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Drupal Cache!

Page 32: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 300 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Drupal Cache!

Page 33: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 350 users

• Standard LAMP Stack• Drupal Commerce • Drupal Cache On + CSS +

JSC Aggregation

D.Cache + Agg

Page 34: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

D.Cache + Agg

Page 35: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 350 users

• Standard LAMP Stack• Drupal Commerce • Drupal Cache On + CSS +

JSC Aggregation

D.Cache + Agg

Page 36: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 350 users

• Standard LAMP Stack• Drupal Commerce • Drupal Cache On + CSS +

JSC Aggregation

D.Cache + Agg

Page 37: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 360 users

• Standard LAMP Stack• Drupal Commerce • Drupal Cache + Views

Cache

Views Cache

Page 38: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Views Cache

Page 39: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 360 users

• Standard LAMP Stack• Drupal Commerce • Drupal Cache + Views

Cache

Views Cache

Page 40: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 360 users

• Standard LAMP Stack• Drupal Commerce • Drupal Cache + Views

Cache

Views Cache

Page 41: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 450 users

• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy

Reverse Proxy (nginx)

Page 42: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 100 users

• Standard LAMP Stack• Drupal Commerce

Kickstart out of the box, no caching turned on

Reverse Proxy

Page 43: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 450 users

• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy

Reverse Proxy (nginx)

Page 44: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 450 users

• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy

Reverse Proxy (nginx)

Page 45: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 450 users

• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy

Reverse Proxy (nginx)

Page 46: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Choke Point – around 450 users

• Standard LAMP Stack• Drupal Commerce• Drupal caching • Reverse Proxy

Reverse Proxy (nginx)

LIVE DEMO

Page 47: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Pt_query_digest

Page 48: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

Pt_query_digest

Page 49: Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014

[email protected]+1.773.525.8255@akucharski@prometsource