This document provides an overview of performance testing and tools. It discusses why performance matters for business metrics and user experience. It then covers various tools for testing performance, including MultiMechanize for load testing applications, Bees with Machine Guns for distributed load testing across multiple machines, and Google PageSpeed for analyzing client-side performance. Best practices discussed include integrating performance testing into continuous integration/deployment processes and monitoring performance in production.
2. Agenda
• Why performance matters?
• Case studies on business impact of performance
• Tools of the trade
• MultiMechanize
• Bees with Machine Guns
• Google PageSpeed
• AppDynamics
• Best practices
• Server Side
• Client Side
• Integrating into your process
• Develop -> Test -> Deploy -> Repeat
• What was the performance impact the last release?
• What about the impact of that configuration change or package upgrade?
3. Dustin Whittle
• dustinwhittle.com
• @dustinwhittle
• San Francisco, California, USA
• Technologist, Traveler, Pilot, Skier, Diver, Sailor,
Golfer
4. What I have worked on
• Developer Evangelist @
• Consultant & Trainer @
• Developer Evangelist @
13. How
fast
is
fast
enough?
§ Performance
is
key
to
a
great
user
experience
-‐ Under
100ms
is
perceived
as
reac1ng
instantaneously
-‐ A
100ms
to
300ms
delay
is
percep1ble
-‐ 1
second
is
about
the
limit
for
the
user's
flow
of
thought
to
stay
uninterrupted
-‐ Users
expect
a
site
to
load
in
2
seconds
-‐ A>er
3
seconds,
40%
will
abandon
your
site.
-‐ 10
seconds
is
about
the
limit
for
keeping
the
user's
aAen1on
§ Modern
applicaGons
spend
more
Gme
in
the
browser
than
on
the
server-‐side
61. Read 2 bees from the roster.
Connecting to the hive.
Assembling bees.
Each of 2 bees will fire 500 rounds, 25 at a time.
Stinging URL so it will be cached for the attack.
Organizing the swarm.
…
Offensive complete.
Complete requests: 1000
Requests per second: 306.540000 [#/sec] (mean)
Time per request: 163.112000 [ms] (mean)
50% response time: 151.000000 [ms] (mean)
90% response time: 192.000000 [ms] (mean)
Mission Assessment: Target crushed bee offensive.
The swarm is awaiting new orders.
63. Read 2 bees from the roster.
Connecting to the hive.
Assembling bees.
Each of 2 bees will fire 50000 rounds, 500 at a time.
Stinging URL so it will be cached for the attack.
Organizing the swarm.
…
Offensive complete.
Complete requests: 100000
Requests per second: 502.420000 [#/sec] (mean)
Time per request: 360.114000 [ms] (mean)
50% response time: 451.000000 [ms] (mean)
90% response time: 402.000000 [ms] (mean)
Mission Assessment: Target crushed bee offensive.
The swarm is awaiting new orders.
64. Read 2 bees from the roster.
Connecting to the hive.
Assembling bees.
Each of 2 bees will fire 50000 rounds, 500 at a time.
Stinging URL so it will be cached for the attack.
Organizing the swarm.
Bee 0 is joining the swarm.
Bee 1 is joining the swarm.
Bee 0 is firing his machine gun. Bang bang!
Bee 0 lost sight of the target (connection timed out).
Bee 1 lost sight of the target (connection timed out).
Offensive complete.
Target timed out without fully responding to 2 bees.
No bees completed the mission. Apparently your bees are peace-loving hippies.
The swarm is awaiting new orders.
115. Test for failures
• NetFlix Simian Army + Chaos Monkey
• What happens if you lose a caching layer?
• What happens if dependencies slow down?
116. Best Practices
• Treat performance as a feature
• Capacity plan and load test the server-side
• Optimize and performance test the client-side
• Understand your starting point
• Instrument everything
• Monitor performance in development and production
• Measure the difference of every change
• Automate performance testing in your build and deployment
process
• Understand how failures impact performance