Siege and Beyond:
An Intro to Benchmarking and Stress Tests
WordCamp Vancouver 2015
Mike Schroder (DH-Shredder)
WordPress Platform Lead at DreamHost
@GetSource - http://www.getsource.net
Slide 2
Slide 2 text
Who Am I?
• Mike Schroder, a.k.a DH-Shredder,
a.k.a. @GetSource
• Third Culture Kid, enjoy Coffee & Sailing
• WordPress 3.9 Co-Lead and Core Contributor
• Happy DreamHost Employee
Slide 3
Slide 3 text
What will happen if my site
hits the reddit front page?
Slide 4
Slide 4 text
What if reddit doesn’t matter to me?
Slide 5
Slide 5 text
Prove how many users can access
your site at one time.
Slide 6
Slide 6 text
Load Testing or Stress Testing?
Slide 7
Slide 7 text
Load Tests: Will my site run well with
the expected amount of users?
Slide 8
Slide 8 text
Stress Tests: How many users before
the site/infrastructure cracks?
Slide 9
Slide 9 text
Are we testing dynamic or cached requests?
Slide 10
Slide 10 text
INTERNET
PHP
FRONT-END CACHE
Slide 11
Slide 11 text
Varnish/Static: ~50ms
Slide 12
Slide 12 text
PHP: ~100ms
(without stress)
Slide 13
Slide 13 text
PHP: ~1500ms
(with stress)
Slide 14
Slide 14 text
All methods are not equal.
Slide 15
Slide 15 text
“Users/minute” does not necessarily
mean “real users during a minute”.
To run dynamic tests
login-url = http://example.com/wp-login.php POST
log=[user]&pwd=[password]&wp-submit=Log+In&
redirect_to=http%3A%2F%2example.com%2Fwp-admin%2F&testcookie=1
Slide 24
Slide 24 text
A list of URLs.
Slide 25
Slide 25 text
List format
HOST=http://example.com
${HOST}/
${HOST}/?feed=rss2
${HOST}/?p=41
${HOST}/?feed=rss2
${HOST}/?p=44
${HOST}/
...