Promet SourceMidCamp 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
•Ho...
AboutAndy
• @AKUCHARSKI
• PROMET SOURCE FOUNDER
• @PROMETSOURCE
AboutPromet
•Focus on Drupal
•CMS platform
•Web applications
•Systems integration
•Practice areas
•Agile Development (Scru...
What Load Testing is not
http://www.flickr.com/photos/peterlozano
•Front End Performance Testing
•High Availability Analys...
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 impro...
HTML DELAY EXPERIMENT
Determine impact of server delays
GOAL
 Delay before sending HTML page
 Different experiments wit...
•LoadStorm.com is a load testing tool for websites
• Test scenarios such as login, e-commerce
• No scripting language need...
Waterfall diagrams
•X = Time
•Y = Number of objects on
page
•Y(1) = HTTP Request –
rest of objects are
elements of the pag...
•DNS Lookup – time it takes for browser to find the server
•Initial Connection – three way handshake, hard to control
•Tim...
• Back End
• Front End
• Render Start
• Render complete
The Victim – 37 objects on home page
Load Storm Hierarchy
PLAN
SCENARIO
STEPS
Test Plan
Script #1 Activity (User browses anonymously) (11%)
1. VUser hits the homepage
2. VUser goes to category #1
3. V...
Test Plan
Script #3 Activity (User abandons a cart, requires login) (68% [2])
1. VUser hits homepage
2. VUser logs into an...
Target: AWS Large
Target
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the
box, no caching turned on
Base...
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the
box, no caching turned on
Base...
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the
box, no caching turned on
Base...
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the
box, no caching turned on
Base...
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the box,
no caching turned on
Base...
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the box,
no caching turned on
Base...
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.Ca...
Choke Point – around 300 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the box,
no caching turned on
Drup...
Choke Point – around 300 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the
box, no caching turned on
Drup...
Choke Point – around 300 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the box,
no caching turned on
Drup...
Choke Point – around 300 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the box,
no caching turned on
Drup...
Choke Point – around 350 users
• Standard LAMP Stack
• Drupal Commerce
• Drupal Cache On + CSS +
JSC Aggregation
D.Cache +...
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the box,
no caching turned on
D.Ca...
Choke Point – around 350 users
• Standard LAMP Stack
• Drupal Commerce
• Drupal Cache On + CSS +
JSC Aggregation
D.Cache +...
Choke Point – around 350 users
• Standard LAMP Stack
• Drupal Commerce
• Drupal Cache On + CSS +
JSC Aggregation
D.Cache +...
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
View...
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 (ngi...
Choke Point – around 100 users
• Standard LAMP Stack
• Drupal Commerce
Kickstart out of the box,
no caching turned on
Reve...
Choke Point – around 450 users
• Standard LAMP Stack
• Drupal Commerce
• Drupal caching
• Reverse Proxy
Reverse Proxy (ngi...
Choke Point – around 450 users
• Standard LAMP Stack
• Drupal Commerce
• Drupal caching
• Reverse Proxy
Reverse Proxy (ngi...
Choke Point – around 450 users
• Standard LAMP Stack
• Drupal Commerce
• Drupal caching
• Reverse Proxy
Reverse Proxy (ngi...
Choke Point – around 450 users
• Standard LAMP Stack
• Drupal Commerce
• Drupal caching
• Reverse Proxy
Reverse Proxy (ngi...
Pt_query_digest
Pt_query_digest
Questions?
andy@promethost.com
+1.773.525.8255
@akucharski
@prometsource
Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014
Drupal commerce performance profiling and tunning using loadstorm experiments  drupal mid camp chicago 2014
Upcoming SlideShare
Loading in …5
×

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

3,298 views
3,208 views

Published on

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.

Published in: Technology
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total views
3,298
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
19
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide
  • What is Load Storm:LoadStorm has been awarded and recognized as the Best Load Testing Tool byWebhostingsearch.com, the leading provider of best quality web hostingreviews on the Internet.“LoadStorm™ is a web-based load testing tool for simulating what users do with a web site or web application. You use it to build tests that send requests to your server in the same way that a user's browser sends requests to your server. But these tests are executed by our automated systems rather than by a user, so they can be done repeatedly and in large numbers simultaneously. They can also be built using our tool in such a way as to simulate a large number of different users with different tasks to perform.
  • The OptionIt home page has 44 objects on it
  • We will be load testing the same site installed on four instances: - Amazon small - Amazon mediumVersusRack Space Cloud 1024MB RamRack Space Cloud 2048MB Ram
  • We will be load testing the same site installed on four instances: - Amazon small - Amazon mediumVersusRack Space Cloud 1024MB RamRack Space Cloud 2048MB Ram
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Stress Test results on a drupal site on Amazon small instance
  • Questions?andy@promethost.com@akucharski@prometsource
  • Drupal commerce performance profiling and tunning using loadstorm experiments drupal mid camp chicago 2014

    1. 1. Promet SourceMidCamp 2104 Stress testing and optimizing a Drupal Commerce on a LAMP stack
    2. 2. 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
    3. 3. AboutAndy • @AKUCHARSKI • PROMET SOURCE FOUNDER • @PROMETSOURCE
    4. 4. AboutPromet •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”
    5. 5. What Load Testing is not http://www.flickr.com/photos/peterlozano •Front End Performance Testing •High Availability Analysis
    6. 6. Why Load Test • Capacity Planning • Capacity Testing • Performance Tuning
    7. 7. 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
    8. 8. 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
    9. 9. •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
    10. 10. 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
    11. 11. •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
    12. 12. • Back End • Front End • Render Start • Render complete
    13. 13. The Victim – 37 objects on home page
    14. 14. Load Storm Hierarchy PLAN SCENARIO STEPS
    15. 15. Test Plan Script #1 Activity (User browses anonymously) (11%) 1. VUser hits the homepage 2. VUser goes to category #1 3. VUser goes to product #1 in category #1 4. VUser goes to category #2 5. VUser goes to product #2 in category #2 6. VUser goes to category #3 7. VUser goes to product #3 in category #3 8. End of session Script #2 Activity (User browses after logging in) (10%) 1. VUser hits the homepage 2. VUser logs into an existing customer account 3. VUser goes to category #1 4. VUser goes to product #1 in category #1 5. VUser goes to category #2 6. VUser goes to product #2 in category #2 7. VUser goes to category #3 8. VUser goes to product #3 in category #3 9. VUser logs out 10. End of session
    16. 16. Test Plan Script #3 Activity (User abandons a cart, requires login) (68% [2]) 1. VUser hits homepage 2. VUser logs into an existing customer account 3. VUser goes to category #1 4. VUser goes to product #2 in category #1 5. VUser adds that product to her cart 6. VUser removes that product from her cart 7. VUser logs out 8. End of session Script #4 Activity (User purchases a product, requires login) (3% [1]) 1. VUser hits homepage 2. VUser logs into an existing customer account 3. VUser goes to category #1 4. VUser goes to product #3 in category #1 5. VUser adds that product to her cart 6. VUser reviews cart 7. VUser goes through the checkout process 8. VUser receives order confirmation 9. VUser logs out 10. End of session
    17. 17. Target: AWS Large
    18. 18. Target
    19. 19. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Baseline
    20. 20. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Baseline
    21. 21. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Baseline
    22. 22. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Baseline
    23. 23. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Baseline
    24. 24. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Baseline
    25. 25. Choke Point – around 300 users • Standard LAMP Stack • Drupal Commerce • Drupal Cache On Drupal Cache!
    26. 26. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on D.Cache
    27. 27. Choke Point – around 300 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Drupal Cache!
    28. 28. Choke Point – around 300 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Drupal Cache!
    29. 29. Choke Point – around 300 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Drupal Cache!
    30. 30. Choke Point – around 300 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Drupal Cache!
    31. 31. Choke Point – around 350 users • Standard LAMP Stack • Drupal Commerce • Drupal Cache On + CSS + JSC Aggregation D.Cache + Agg
    32. 32. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on D.Cache + Agg
    33. 33. Choke Point – around 350 users • Standard LAMP Stack • Drupal Commerce • Drupal Cache On + CSS + JSC Aggregation D.Cache + Agg
    34. 34. Choke Point – around 350 users • Standard LAMP Stack • Drupal Commerce • Drupal Cache On + CSS + JSC Aggregation D.Cache + Agg
    35. 35. Choke Point – around 360 users • Standard LAMP Stack • Drupal Commerce • Drupal Cache + Views Cache Views Cache
    36. 36. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Views Cache
    37. 37. Choke Point – around 360 users • Standard LAMP Stack • Drupal Commerce • Drupal Cache + Views Cache Views Cache
    38. 38. Choke Point – around 360 users • Standard LAMP Stack • Drupal Commerce • Drupal Cache + Views Cache Views Cache
    39. 39. Choke Point – around 450 users • Standard LAMP Stack • Drupal Commerce • Drupal caching • Reverse Proxy Reverse Proxy (nginx)
    40. 40. Choke Point – around 100 users • Standard LAMP Stack • Drupal Commerce Kickstart out of the box, no caching turned on Reverse Proxy
    41. 41. Choke Point – around 450 users • Standard LAMP Stack • Drupal Commerce • Drupal caching • Reverse Proxy Reverse Proxy (nginx)
    42. 42. Choke Point – around 450 users • Standard LAMP Stack • Drupal Commerce • Drupal caching • Reverse Proxy Reverse Proxy (nginx)
    43. 43. Choke Point – around 450 users • Standard LAMP Stack • Drupal Commerce • Drupal caching • Reverse Proxy Reverse Proxy (nginx)
    44. 44. Choke Point – around 450 users • Standard LAMP Stack • Drupal Commerce • Drupal caching • Reverse Proxy Reverse Proxy (nginx) LIVE DEMO
    45. 45. Pt_query_digest
    46. 46. Pt_query_digest
    47. 47. Questions? andy@promethost.com +1.773.525.8255 @akucharski @prometsource

    ×