Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Agile performance testing
Search
Andreas Bjärlestam
March 30, 2016
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Agile performance testing
Agile performance testing with Amazon AWS, tmux and siege
Andreas Bjärlestam
March 30, 2016
More Decks by Andreas Bjärlestam
See All by Andreas Bjärlestam
Climate compensate with a pull request
bjarlestam
0
46
SPDY and HTTP2
bjarlestam
1
1.3k
SPDY or maybe HTTP2.0
bjarlestam
4
70
jquery mobile
bjarlestam
0
75
Devise - taking care of your users
bjarlestam
0
78
REST with JAX-RS
bjarlestam
1
97
REST
bjarlestam
2
170
Other Decks in Programming
See All in Programming
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
290
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
600
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
140
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
170
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
140
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
180
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
さぁV100、メモリをお食べ・・・
nilpe
0
150
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
580
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
560
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Featured
See All Featured
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Producing Creativity
orderedlist
PRO
348
40k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
400
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.8k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Writing Fast Ruby
sferik
630
63k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Transcript
Understanding your system Andreas Bjärlestam! 2016-03-30! _____ .__.__ / _
\ ____ |__| | ____ / /_\ \ / ___\| | | _/ __ \ / | \/ /_/ > | |_\ ___/ \____|__ /\___ /|__|____/\___ > \//_____/ \/ _____ ______ ____________/ ____\___________ _____ _____ ____ ____ ____ \____ \_/ __ \_ __ \ __\/ _ \_ __ \/ \\__ \ / \_/ ___\/ __ \ | |_> > ___/| | \/| | ( <_> ) | \/ Y Y \/ __ \| | \ \__\ ___/ | __/ \___ >__| |__| \____/|__| |__|_| (____ /___| /\___ >___ > |__| \/ \/ \/ \/ \/ \/ __ __ .__ _/ |_ ____ _______/ |_|__| ____ ____ \ __\/ __ \ / ___/\ __\ |/ \ / ___\ | | \ ___/ \___ \ | | | | | \/ /_/ > |__| \___ >____ > |__| |__|___| /\___ / \/ \/ \//_____/
Do you know on top of your head: • How
many req/s your system can handle? • What response >me it has? • How it scales? • What the bo@lenecks are? • How stable it is over >me?
Many s>ll do big bang performance tes>ng
Stop seeing performance tests as verifica>on It should be an
integrated part of your development cycle Con>nuously analyze your system
You should do it all the >me!
I’m lazy, so performance tes>ng must be quick and simple
isola>on
Your test client should do nothing but loadtes>ng, no interference
Amazon AWS + tmux = win!
You can leave it on and come back to check
every now and then
Combine with monitoring: Newrelic Kibana Graphite
> sudo yum install siege
> siege -c10 -t30s -d1 -i -f urls.txt
siege • Quick and simple • Instant visual feedback •
Good summary of most important metrics • Good enough for most scenarios = You can work in quick itera>ons
Create a Traffic Model
Your best guess of how the system will be used
When replacing a system Get access logs from the old
system Analyze which parts of the system that generate the most load Plot them over >me to get a feeling for peaks and average load
If you replay access logs against your system with siege
you can gain a lot of insights and find problems like unhandled urls, unnecessary redirects etc
Build a urls.txt file Based on traffic model Fill a
file with urls that represent your expected traffic, one url per line Think about the propor>ons of different types of urls
Build a urls.txt file Expec>ng broad traffic -> many urls
Expec>ng narrow traffic -> not so many
Build a urls.txt file h@p://example.com h@p://example.com/user/s>na h@p://example.com/user/olof h@p://example.com/user/sven h@p://example.com/user/siv h@p://example.com/user/ellen
h@p://example.com/country/sweden h@p://example.com/country/norway
Build a urls.txt file curl cut jq grep etc are
your friends
Build a urls.txt file You can send POST as well
h@p://example.com/user/s>na POST age=23 h@p://example.com/user/s>na POST a=1&b=2 h@p://example.com/user/s>na POST <./s>na.txt
Finding the system limits
10 req/s OK 100 req/s OK 500 req/s Slooow 300
req/s OK
Scale up with more CPU or processors and try again
Does it scale linearly?
This is a good >me to think about the bo@lenecks
of your system I/O CPU Sync / Async
Adjust and try again
Keep an eye on system metrics Response >me CPU load
Memory usage Error rates etc
Stability tes>ng
Start a linux machine on AWS Set up a session
with tmux Start siege Leave it running
> siege -c10 -t24h -i -d1 -f urls.txt
Put your system under con>nuous load from your first commit
Keep an eye on system metrics every now and then
Good to know: siege counts error responses and will stop
if it encounters more than 1024 errors
TLDR Stop doing performance tests like its 1999 Put your
system under load from day 1 Run tests interac>vely, be crea>ve Gain understanding AWS + tmux + siege is awesome!
tmux cheat sheet > tmux new -s loadtest starts a
new session named loadtest ctrl-b + d exits session > tmux list-sessions lists all current sessions > tmux a@ach -t loadtest a@aches to the session named loadtest
If siege does not fit your use case You could
try - gatling - locust - wrk They are bigger (more complex) hammers