SlideShare una empresa de Scribd logo
1 de 78
Descargar para leer sin conexión
Load Test Like a Pro
Rob Harrop
Agenda
● Who am I?
● Why bother load testing?
● Load Testing Process
○ Designing load tests like a pro
○ Running load tests like a pro
○ Analysing load tests like a pro
Who Am I?
CEO @SKIPJAQ
Co-Founder @SpringSource
Why Bother?
Time is Money
Faster → Better Service
Better Service → Improved Conversion
5slatency reduction =
7-12%increased conversion
Every 1s latency reduction =
~2%increase in conversion
2.2s reduction in average latency =
15.4%increase in download conversion
Slower → Partial Outage
One hour of downtime≈
$21,000revenue lost
One hour of slowdown≈
$4,400revenue lost
But!
Slowdowns are 10x more likely
than downtime
Twiceas much revenuelost to
slowdowns
Recap
● Your organisation (likely) exists to make money
● Application performance has a big impact on revenue
● The magnitude of this impact far outweighs the
investment you will make to maintain and improve
performance
Load Testing is a Process
In Fact ...
Load Testing is a
ContinuousProcess
Purpose Design
Glory!
Run
Analyse
● Once designed, a load test is good for multiple runs
● How many runs depends on:
○ How often you run
○ How often your code changes
○ How often your audience changes
● You must revisit the design as the landscape changes
Designing a Load Test
Step One: Define the purpose for testing
Step Two: Construct a high-quality test plan
Purpose
● What latency do I see with X concurrent users?
● How many concurrent users can I handle before latency
exceeds Xms?
● How many concurrent users can I handle before my system
is saturated?
● Average latency is mostly useless as a metric
● Later percentiles are better: 90th, 95th, 99th, 99.9th
● Max is a useful measure but is highly susceptible to
measurement error
● For best results, consider whole distribution analysis
Measuring Latency
Measuring Latency
● You may legitimately want to answer multiple
questions at once
● Consider a load test as a series of explorations up
your load curve
Test Plan
Test Plan Model
● Traditional test plans are prescriptive and deterministic
● A great test model is descriptive and probabilistic
Prescriptive
GET /home GET /offices GET /jobs GET /team
Prescriptive
GET /home GET /offices GET /jobs GET /team
GET /home GET /offices GET /jobs GET /team
Thread 1:
Thread N:
...
This is where load
tests go to die
Descriptive
GET /home
GET /offices
GET /team
GET /jobs
10%
30%
25%
5%
Each user is different
Transition Probabilities Capture
This Difference
Descriptive
GET /home
GET /offices
GET /team
GET /jobs
10%
30%
25%
5%
1500ms
3000ms
1200ms
1400ms
Wait Times are
A Thing™
● Wait times are typically non-zero
● Wait times are drawn from a distribution
● If you don’t know the distribution, exponential is a good
fallback
● Google Analytics, MixPanel, Kiss Metrics
● Log files
● OpenZipkin, AWS X-Ray
● NewRelic, AppDynamics, Instana
Source Model Parameters From Real Data
Recap
● Design with a purpose in mind
● Each user is different, capture this difference in your model
● Probabilistic models are better than prescriptive plans
● Production data is the best source of model parameters
Running a Load Test
Step One: Create a high-fidelity load test environment
Step Two: Provision enough load generation capacity
Step Three: Instrument the System Under Test
Step Four: Implement the test model for your load generator of choice
Step Five: Go!
● The closer to production the better
● Ideally, you’re already automating production provisioning
● Stubbing is acceptable, but you must do it well
The System Under Test
● Stubs must exhibit service times like real systems
● Service times and wait times are modelled the same way
● github.com/spectolabs/hoverfly
Hoverfly
● Laptops are not load generators
● Less is not more
● If in doubt, over provision
● Make sure that you’re tracking metrics from the load
generators
Load Generators
● CPU, memory, I/O
● Usage, Saturation and Errors (USE)
● Background reading: Systems Performance by Brendan
Gregg
Instrumentation
USE Metrics
Resource Utilisation Saturation Errors
CPU CPU % Run Queue Length ECC events/Failed CPUs
Memory Free/Used %
Anon. Paging/Thread
Swapping
Failed mallocs?
Network I/O RX/TX throughput
NIC events
(drops/overruns)
Disk I/O Busy % Wait Queue Length Device Errors
Implementing in JMeter
The Load Model
GET /home
GET /offices
GET /team
GET /jobs
20%
10%
20%
3500ms
3400ms
6000ms
GET
/management
25% 5000ms
Let’s Go!
Warm Up
Run With
X Users
Saturated? Analysis
X=X*Y
● Super low tech: check the results by hand
● Low tech: check a plot of the results
● High tech: fit a curve to the plot and check that
● Super high tech: take the derivative of the fitted curve
Detecting Saturation
Checking The Results
Load Level Run Time (ms) Total Requests Throughput Errors Error %
30 729400 11420 15.65670 0 0.00000000
40 752098 15256 20.28459 0 0.00000000
50 786117 19069 24.25720 0 0.00000000
60 798399 22971 28.77133 2 0.00870663
70 784018 26691 34.04386 0 0.00000000
80 819177 30459 37.18244 9 0.02954792
90 852584 34259 40.18255 0 0.00000000
100 825598 38103 46.15200 0 0.00000000
110 843654 41984 49.76448 0 0.00000000
120 871827 45751 52.47715 32 0.06994383
130 1024274 49520 48.34644 0 0.00000000
140 1165331 53468 45.88224 6 0.01122167
150 1354668 57177 42.20739 32 0.05596656
Checking a Plot
Fitting a Curve
Derivative of the Curve
Retrograde Scaling
Load Level Run Time (ms) Total Requests Throughput Errors Error %
30 729400 11420 15.65670 0 0.00000000
40 752098 15256 20.28459 0 0.00000000
50 786117 19069 24.25720 0 0.00000000
60 798399 22971 28.77133 2 0.00870663
70 784018 26691 34.04386 0 0.00000000
80 819177 30459 37.18244 9 0.02954792
90 852584 34259 40.18255 0 0.00000000
100 825598 38103 46.15200 0 0.00000000
110 843654 41984 49.76448 0 0.00000000
120 871827 45751 52.47715 32 0.06994383
130 1024274 49520 48.34644 0 0.00000000
140 1165331 53468 45.88224 6 0.01122167
150 1354668 57177 42.20739 32 0.05596656
Recap
● Testing to saturation provides you with plenty of data
● Detecting saturation is relatively simple from the outside
● Tracking internal performance metrics helps to track
saturation
Analysing a Load Test
Step Zero: Learn R
Step One: Exploratory analysis
Step Two: Answer your questions
Step Three: Link to production data
The Basic Histogram
Log Scale Histogram
Faceted Histogram
As a Timeseries
The Humble Table
Label 50%ile 90%ile 95%ile 99%ile 99.9%ile 100%ile
Home 94 116 176 852.01 1474 5599
Jobs 175 185 239.65 960.64 4719.171 7178
Management 176 181 220.2 1041.56 1490.656 1516
Offices 176 186.4 229.7 1129.76 1683.586 7190
Team 175 182 223.7 1082.86 1676.934 4647
QoS per Load Level
Load Level 50%ile 90%ile 95%ile 99%ile 99.9%ile 100%ile
60 95 177 179 409.60 1269.120 2137
70 95 177 179 541.10 1430.170 1817
80 95 177 179 619.00 1423.084 4906
90 95 178 180 843.00 1652.226 4529
100 95 178 181 870.96 1650.898 5248
110 95 178 182 934.17 1711.034 5543
120 96 178 186 952.50 1568.000 7190
130 97 180 286 1152.00 6118.215 9268
140 158 189 331 1241.33 5876.665 7608
150 169 198 318 1386.48 5150.648 9724
Labelled QoS
Label Load Level 50%ile 90%ile 95%ile 99%ile 99.9%ile 100%ile
Home 60 93 96.0 99.00 374.00 1187.021 1772
Home 70 93 96.0 101.00 463.03 1359.006 1817
Home 80 93 97.0 107.00 515.04 1422.002 4793
Home 90 93 97.0 122.00 705.04 1642.509 4478
Home 100 93 99.0 129.00 715.05 1671.005 5158
Home 110 93 100.0 140.00 864.00 1675.503 5485
Home 120 94 116.0 176.00 852.01 1474.000 5599
Home 130 94 176.0 181.00 1135.00 6176.000 9204
Home 140 94 178.0 187.00 1192.03 5879.001 7523
Home 150 96 180.0 201.00 1384.00 5658.000 9713
Recap
● Experiment with different visualisations
● A simple table might be the best visualisation you have
● Segment analysis by endpoint
● Understand your load in the context of your production
metrics
In Summary
Load Test
With Purpose
Load Test With
Real User Models
Explore Your
Load Curve
Analyse in the
Context of Real Data
Performance Matters

Más contenido relacionado

Destacado

Oslo Schibsted Performance Gathering
Oslo Schibsted Performance GatheringOslo Schibsted Performance Gathering
Oslo Schibsted Performance Gathering
Almudena Vivanco
 
Loadrunner presentation
Loadrunner presentationLoadrunner presentation
Loadrunner presentation
medsherb
 
Performance testing for web applications – techniques, metrics and profiling
Performance testing for web applications – techniques, metrics and profilingPerformance testing for web applications – techniques, metrics and profiling
Performance testing for web applications – techniques, metrics and profiling
TestCampRO
 
Performance Testing With Loadrunner
Performance Testing With LoadrunnerPerformance Testing With Loadrunner
Performance Testing With Loadrunner
vladimir zaremba
 

Destacado (20)

Jeg har skabt
Jeg har skabtJeg har skabt
Jeg har skabt
 
Annotation
AnnotationAnnotation
Annotation
 
Going Reactive
Going ReactiveGoing Reactive
Going Reactive
 
Oslo Schibsted Performance Gathering
Oslo Schibsted Performance GatheringOslo Schibsted Performance Gathering
Oslo Schibsted Performance Gathering
 
A Short History of Performance Engineering
A Short History of Performance EngineeringA Short History of Performance Engineering
A Short History of Performance Engineering
 
Web test
Web testWeb test
Web test
 
Loadrunner presentation
Loadrunner presentationLoadrunner presentation
Loadrunner presentation
 
How to Get Automatic Analysis for Load Test Results
How to Get Automatic Analysis for Load Test ResultsHow to Get Automatic Analysis for Load Test Results
How to Get Automatic Analysis for Load Test Results
 
What is Loadrunner ?
What is Loadrunner ?What is Loadrunner ?
What is Loadrunner ?
 
Web performance testing
Web performance testingWeb performance testing
Web performance testing
 
Analyzing Performance Test Data
Analyzing Performance Test DataAnalyzing Performance Test Data
Analyzing Performance Test Data
 
How to successfully load test over a million concurrent users stp con demo
How to successfully load test over a million concurrent users stp con demoHow to successfully load test over a million concurrent users stp con demo
How to successfully load test over a million concurrent users stp con demo
 
Performance testing for web applications – techniques, metrics and profiling
Performance testing for web applications – techniques, metrics and profilingPerformance testing for web applications – techniques, metrics and profiling
Performance testing for web applications – techniques, metrics and profiling
 
Performance Test Automation Framework Presentation
Performance Test Automation Framework PresentationPerformance Test Automation Framework Presentation
Performance Test Automation Framework Presentation
 
Performance Testing With Loadrunner
Performance Testing With LoadrunnerPerformance Testing With Loadrunner
Performance Testing With Loadrunner
 
An Introduction to Performance Testing
An Introduction to Performance TestingAn Introduction to Performance Testing
An Introduction to Performance Testing
 
Hp Loadrunner
Hp LoadrunnerHp Loadrunner
Hp Loadrunner
 
QConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing systemQConSF 2014 talk on Netflix Mantis, a stream processing system
QConSF 2014 talk on Netflix Mantis, a stream processing system
 
E commerce Testing
E commerce TestingE commerce Testing
E commerce Testing
 
Performance Requirement Gathering
Performance Requirement GatheringPerformance Requirement Gathering
Performance Requirement Gathering
 

Similar a Load Test Like a Pro

The Why and How of Continuous Delivery
The Why and How of Continuous DeliveryThe Why and How of Continuous Delivery
The Why and How of Continuous Delivery
Nigel McNie
 
Ways to minimise performance risks in continuous delivery
Ways to minimise performance risks in continuous deliveryWays to minimise performance risks in continuous delivery
Ways to minimise performance risks in continuous delivery
a32an
 

Similar a Load Test Like a Pro (20)

Provisioning and Capacity Planning Workshop (Dogpatch Labs, September 2015)
Provisioning and Capacity Planning Workshop (Dogpatch Labs, September 2015)Provisioning and Capacity Planning Workshop (Dogpatch Labs, September 2015)
Provisioning and Capacity Planning Workshop (Dogpatch Labs, September 2015)
 
Vsm and wip with arena simulation
Vsm and wip with  arena simulationVsm and wip with  arena simulation
Vsm and wip with arena simulation
 
London web performance WPO Lessons from the field June 2013
London web performance   WPO Lessons from the field June 2013London web performance   WPO Lessons from the field June 2013
London web performance WPO Lessons from the field June 2013
 
Provisioning and Capacity Planning (Travel Meets Big Data)
Provisioning and Capacity Planning (Travel Meets Big Data)Provisioning and Capacity Planning (Travel Meets Big Data)
Provisioning and Capacity Planning (Travel Meets Big Data)
 
Getput suite
Getput suiteGetput suite
Getput suite
 
Supply chain design and operation
Supply chain design and operationSupply chain design and operation
Supply chain design and operation
 
Need for Speed: How to Performance Test the right way by Annie Bhaumik
Need for Speed: How to Performance Test the right way by Annie BhaumikNeed for Speed: How to Performance Test the right way by Annie Bhaumik
Need for Speed: How to Performance Test the right way by Annie Bhaumik
 
The Why and How of Continuous Delivery
The Why and How of Continuous DeliveryThe Why and How of Continuous Delivery
The Why and How of Continuous Delivery
 
Ways to minimise performance risks in continuous delivery
Ways to minimise performance risks in continuous deliveryWays to minimise performance risks in continuous delivery
Ways to minimise performance risks in continuous delivery
 
WALT vs PELT : Redux - SFO17-307
WALT vs PELT : Redux  - SFO17-307WALT vs PELT : Redux  - SFO17-307
WALT vs PELT : Redux - SFO17-307
 
Value add: Single User Performance Testing (http://managingperformancetesting...
Value add: Single User Performance Testing (http://managingperformancetesting...Value add: Single User Performance Testing (http://managingperformancetesting...
Value add: Single User Performance Testing (http://managingperformancetesting...
 
A lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous deliveryA lean automation blueprint for testing in continuous delivery
A lean automation blueprint for testing in continuous delivery
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)
 
From Commit to Customer in a fully automated way | DevOps | Third Bridge Group
From Commit to Customer in a fully automated way | DevOps | Third Bridge GroupFrom Commit to Customer in a fully automated way | DevOps | Third Bridge Group
From Commit to Customer in a fully automated way | DevOps | Third Bridge Group
 
Netflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesNetflix SRE perf meetup_slides
Netflix SRE perf meetup_slides
 
Stress Test & Chaos Engineering
Stress Test & Chaos EngineeringStress Test & Chaos Engineering
Stress Test & Chaos Engineering
 
Andrew rusling 21 experiments to increase velocity
Andrew rusling 21 experiments to increase velocityAndrew rusling 21 experiments to increase velocity
Andrew rusling 21 experiments to increase velocity
 
21 experiments to increase velocity
21 experiments to increase velocity21 experiments to increase velocity
21 experiments to increase velocity
 
Designing apps for resiliency
Designing apps for resiliencyDesigning apps for resiliency
Designing apps for resiliency
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Último (20)

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

Load Test Like a Pro

  • 1. Load Test Like a Pro Rob Harrop
  • 2. Agenda ● Who am I? ● Why bother load testing? ● Load Testing Process ○ Designing load tests like a pro ○ Running load tests like a pro ○ Analysing load tests like a pro
  • 3. Who Am I? CEO @SKIPJAQ Co-Founder @SpringSource
  • 5.
  • 8. Better Service → Improved Conversion
  • 10. Every 1s latency reduction = ~2%increase in conversion
  • 11. 2.2s reduction in average latency = 15.4%increase in download conversion
  • 13. One hour of downtime≈ $21,000revenue lost
  • 14. One hour of slowdown≈ $4,400revenue lost
  • 15. But!
  • 16. Slowdowns are 10x more likely than downtime
  • 17. Twiceas much revenuelost to slowdowns
  • 18. Recap ● Your organisation (likely) exists to make money ● Application performance has a big impact on revenue ● The magnitude of this impact far outweighs the investment you will make to maintain and improve performance
  • 19. Load Testing is a Process
  • 21. Load Testing is a ContinuousProcess
  • 23. ● Once designed, a load test is good for multiple runs ● How many runs depends on: ○ How often you run ○ How often your code changes ○ How often your audience changes ● You must revisit the design as the landscape changes
  • 25. Step One: Define the purpose for testing Step Two: Construct a high-quality test plan
  • 27. ● What latency do I see with X concurrent users? ● How many concurrent users can I handle before latency exceeds Xms? ● How many concurrent users can I handle before my system is saturated?
  • 28. ● Average latency is mostly useless as a metric ● Later percentiles are better: 90th, 95th, 99th, 99.9th ● Max is a useful measure but is highly susceptible to measurement error ● For best results, consider whole distribution analysis Measuring Latency
  • 30. ● You may legitimately want to answer multiple questions at once ● Consider a load test as a series of explorations up your load curve
  • 31.
  • 34. ● Traditional test plans are prescriptive and deterministic ● A great test model is descriptive and probabilistic
  • 35. Prescriptive GET /home GET /offices GET /jobs GET /team
  • 36. Prescriptive GET /home GET /offices GET /jobs GET /team GET /home GET /offices GET /jobs GET /team Thread 1: Thread N: ...
  • 37. This is where load tests go to die
  • 38. Descriptive GET /home GET /offices GET /team GET /jobs 10% 30% 25% 5%
  • 39. Each user is different
  • 41. Descriptive GET /home GET /offices GET /team GET /jobs 10% 30% 25% 5% 1500ms 3000ms 1200ms 1400ms
  • 42. Wait Times are A Thing™
  • 43. ● Wait times are typically non-zero ● Wait times are drawn from a distribution ● If you don’t know the distribution, exponential is a good fallback
  • 44. ● Google Analytics, MixPanel, Kiss Metrics ● Log files ● OpenZipkin, AWS X-Ray ● NewRelic, AppDynamics, Instana Source Model Parameters From Real Data
  • 45. Recap ● Design with a purpose in mind ● Each user is different, capture this difference in your model ● Probabilistic models are better than prescriptive plans ● Production data is the best source of model parameters
  • 47. Step One: Create a high-fidelity load test environment Step Two: Provision enough load generation capacity Step Three: Instrument the System Under Test Step Four: Implement the test model for your load generator of choice Step Five: Go!
  • 48. ● The closer to production the better ● Ideally, you’re already automating production provisioning ● Stubbing is acceptable, but you must do it well The System Under Test
  • 49. ● Stubs must exhibit service times like real systems ● Service times and wait times are modelled the same way ● github.com/spectolabs/hoverfly Hoverfly
  • 50. ● Laptops are not load generators ● Less is not more ● If in doubt, over provision ● Make sure that you’re tracking metrics from the load generators Load Generators
  • 51. ● CPU, memory, I/O ● Usage, Saturation and Errors (USE) ● Background reading: Systems Performance by Brendan Gregg Instrumentation
  • 52. USE Metrics Resource Utilisation Saturation Errors CPU CPU % Run Queue Length ECC events/Failed CPUs Memory Free/Used % Anon. Paging/Thread Swapping Failed mallocs? Network I/O RX/TX throughput NIC events (drops/overruns) Disk I/O Busy % Wait Queue Length Device Errors
  • 54. The Load Model GET /home GET /offices GET /team GET /jobs 20% 10% 20% 3500ms 3400ms 6000ms GET /management 25% 5000ms
  • 55. Let’s Go! Warm Up Run With X Users Saturated? Analysis X=X*Y
  • 56. ● Super low tech: check the results by hand ● Low tech: check a plot of the results ● High tech: fit a curve to the plot and check that ● Super high tech: take the derivative of the fitted curve Detecting Saturation
  • 57. Checking The Results Load Level Run Time (ms) Total Requests Throughput Errors Error % 30 729400 11420 15.65670 0 0.00000000 40 752098 15256 20.28459 0 0.00000000 50 786117 19069 24.25720 0 0.00000000 60 798399 22971 28.77133 2 0.00870663 70 784018 26691 34.04386 0 0.00000000 80 819177 30459 37.18244 9 0.02954792 90 852584 34259 40.18255 0 0.00000000 100 825598 38103 46.15200 0 0.00000000 110 843654 41984 49.76448 0 0.00000000 120 871827 45751 52.47715 32 0.06994383 130 1024274 49520 48.34644 0 0.00000000 140 1165331 53468 45.88224 6 0.01122167 150 1354668 57177 42.20739 32 0.05596656
  • 61. Retrograde Scaling Load Level Run Time (ms) Total Requests Throughput Errors Error % 30 729400 11420 15.65670 0 0.00000000 40 752098 15256 20.28459 0 0.00000000 50 786117 19069 24.25720 0 0.00000000 60 798399 22971 28.77133 2 0.00870663 70 784018 26691 34.04386 0 0.00000000 80 819177 30459 37.18244 9 0.02954792 90 852584 34259 40.18255 0 0.00000000 100 825598 38103 46.15200 0 0.00000000 110 843654 41984 49.76448 0 0.00000000 120 871827 45751 52.47715 32 0.06994383 130 1024274 49520 48.34644 0 0.00000000 140 1165331 53468 45.88224 6 0.01122167 150 1354668 57177 42.20739 32 0.05596656
  • 62. Recap ● Testing to saturation provides you with plenty of data ● Detecting saturation is relatively simple from the outside ● Tracking internal performance metrics helps to track saturation
  • 64. Step Zero: Learn R Step One: Exploratory analysis Step Two: Answer your questions Step Three: Link to production data
  • 69. The Humble Table Label 50%ile 90%ile 95%ile 99%ile 99.9%ile 100%ile Home 94 116 176 852.01 1474 5599 Jobs 175 185 239.65 960.64 4719.171 7178 Management 176 181 220.2 1041.56 1490.656 1516 Offices 176 186.4 229.7 1129.76 1683.586 7190 Team 175 182 223.7 1082.86 1676.934 4647
  • 70. QoS per Load Level Load Level 50%ile 90%ile 95%ile 99%ile 99.9%ile 100%ile 60 95 177 179 409.60 1269.120 2137 70 95 177 179 541.10 1430.170 1817 80 95 177 179 619.00 1423.084 4906 90 95 178 180 843.00 1652.226 4529 100 95 178 181 870.96 1650.898 5248 110 95 178 182 934.17 1711.034 5543 120 96 178 186 952.50 1568.000 7190 130 97 180 286 1152.00 6118.215 9268 140 158 189 331 1241.33 5876.665 7608 150 169 198 318 1386.48 5150.648 9724
  • 71. Labelled QoS Label Load Level 50%ile 90%ile 95%ile 99%ile 99.9%ile 100%ile Home 60 93 96.0 99.00 374.00 1187.021 1772 Home 70 93 96.0 101.00 463.03 1359.006 1817 Home 80 93 97.0 107.00 515.04 1422.002 4793 Home 90 93 97.0 122.00 705.04 1642.509 4478 Home 100 93 99.0 129.00 715.05 1671.005 5158 Home 110 93 100.0 140.00 864.00 1675.503 5485 Home 120 94 116.0 176.00 852.01 1474.000 5599 Home 130 94 176.0 181.00 1135.00 6176.000 9204 Home 140 94 178.0 187.00 1192.03 5879.001 7523 Home 150 96 180.0 201.00 1384.00 5658.000 9713
  • 72. Recap ● Experiment with different visualisations ● A simple table might be the best visualisation you have ● Segment analysis by endpoint ● Understand your load in the context of your production metrics
  • 75. Load Test With Real User Models
  • 77. Analyse in the Context of Real Data