SlideShare a Scribd company logo
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

More Related Content

Viewers also liked

Jeg har skabt
Jeg har skabtJeg har skabt
Annotation
AnnotationAnnotation
Annotation
JungHoon Lee
 
Going Reactive
Going ReactiveGoing Reactive
Going Reactive
Rob Harrop
 
Oslo Schibsted Performance Gathering
Oslo Schibsted Performance GatheringOslo Schibsted Performance Gathering
Oslo Schibsted Performance GatheringAlmudena Vivanco
 
A Short History of Performance Engineering
A Short History of Performance EngineeringA Short History of Performance Engineering
A Short History of Performance Engineering
Alexander Podelko
 
Loadrunner presentation
Loadrunner presentationLoadrunner presentation
Loadrunner presentationmedsherb
 
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
Clare Avieli
 
What is Loadrunner ?
What is Loadrunner ?What is Loadrunner ?
What is Loadrunner ?
Guru99
 
Web performance testing
Web performance testingWeb performance testing
Web performance testing
Patrick Meenan
 
Analyzing Performance Test Data
Analyzing Performance Test DataAnalyzing Performance Test Data
Analyzing Performance Test Data
Optimus Information Inc.
 
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
Apica
 
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 profilingTestCampRO
 
Performance Test Automation Framework Presentation
Performance Test Automation Framework PresentationPerformance Test Automation Framework Presentation
Performance Test Automation Framework Presentation
Mikhael Gelezov
 
Performance Testing With Loadrunner
Performance Testing With LoadrunnerPerformance Testing With Loadrunner
Performance Testing With Loadrunnervladimir zaremba
 
An Introduction to Performance Testing
An Introduction to Performance TestingAn Introduction to Performance Testing
An Introduction to Performance Testing
David Tzemach
 
Hp Loadrunner
Hp LoadrunnerHp Loadrunner
Hp Loadrunner
guestb3416f
 
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
Danny Yuan
 
E commerce Testing
E commerce TestingE commerce Testing
E commerce Testing
Atul Pant
 
Performance Requirement Gathering
Performance Requirement GatheringPerformance Requirement Gathering
Performance Requirement Gathering
Atul Pant
 

Viewers also liked (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 to Load Test Like a Pro

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)
Brian Brazil
 
Vsm and wip with arena simulation
Vsm and wip with  arena simulationVsm and wip with  arena simulation
Vsm and wip with arena simulation
uniceder1111
 
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
Stephen Thair
 
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)
Brian Brazil
 
Getput suite
Getput suiteGetput suite
Getput suite
Iben Rodriguez
 
Supply chain design and operation
Supply chain design and operationSupply chain design and operation
Supply chain design and operation
AngelainBay
 
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
QA or the Highway
 
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 DeliveryNigel 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 deliverya32an
 
WALT vs PELT : Redux - SFO17-307
WALT vs PELT : Redux  - SFO17-307WALT vs PELT : Redux  - SFO17-307
WALT vs PELT : Redux - SFO17-307
Linaro
 
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...
akbollinger
 
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
Sauce Labs
 
Continuous Performance Testing
Continuous Performance TestingContinuous Performance Testing
Continuous Performance Testing
Mark Price
 
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)
Artem Orobets
 
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
Douglas Adams
 
Netflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesNetflix SRE perf meetup_slides
Netflix SRE perf meetup_slides
Ed Hunter
 
Stress Test & Chaos Engineering
Stress Test & Chaos EngineeringStress Test & Chaos Engineering
Stress Test & Chaos Engineering
Diego Pacheco
 
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
Scrum Australia Pty Ltd
 
21 experiments to increase velocity
21 experiments to increase velocity21 experiments to increase velocity
21 experiments to increase velocity
Andrew Rusling
 
Designing apps for resiliency
Designing apps for resiliencyDesigning apps for resiliency
Designing apps for resiliency
Masashi Narumoto
 

Similar to 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
 

Recently uploaded

May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
abdulrafaychaudhry
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Pro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp BookPro Unity Game Development with C-sharp Book
Pro Unity Game Development with C-sharp Book
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

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