Putting demand on a software system or computing device and measuring its response under both normal and anticipated peak load conditions -Wikipedia
Load testing a component or system to determine its performance characteristics -Testing Performance Ltd
requests per second (or minute)
response time in ms (or μs)
What is Google's recommended maximum server response time?
https://developers.google.com/speed/docs/insights/Server
https://www.nngroup.com/articles/response-times-3-important-limits/
How well do you know your web apps' latency and/or throughput?
Pretend it's a science experiment
Name | OS | Role | CPU | RAM | NIC | Notes |
---|---|---|---|---|---|---|
perfsvr | Windows Server 2012 R2 | Web Server | Xeon E5-1650 | 32 GB | Intel® Ethernet Converged Network Adapter X540-T1 10GbE | |
perfsvr2 | Ubuntu 14.04 LTS | Web Server & Load Generator | Xeon E5-1650 | 32 GB | Intel® Ethernet Converged Network Adapter X540-T1 10GbE | |
perf02 | Windows Server 2012 R2 | Load Generator | Xeon W3550 | 24 GB | Intel® Ethernet Converged Network Adapter X540-T1 10GbE | |
perf03 | Ubuntu 14.04 LTS | Load Generator | Xeon W3550 | 12 GB | Intel® Ethernet Converged Network Adapter X540-T1 10GbE |
8-port Netgear XS708E 10-Gigabit switch
~$ wrk {url}
1 thread
reqres | reqres | reqres | reqres | reqres |
2 threads
reqres | reqres | reqres | reqres | req | ||||
reqres | reqres | reqres | reqres |
(juggling metaphor)
8 threads
reqres | reqres | req | ||||||||||||||||
reqres | reqres | req | ||||||||||||||||
reqres | reqres | req | ||||||||||||||||
reqres | reqres | |||||||||||||||||
reqres | req | |||||||||||||||||
reqres | req | |||||||||||||||||
reqres | req | |||||||||||||||||
reqres | req |
https://github.com/wg/wrk/tree/master/scripts#post.lua wrk.method = "POST" wrk.body = "foo=bar&baz=quux" wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
~$ wrk -t1 -c1 -d10 -s post.lua http://192.168.1.100:5000/my-form
~$
Running 10s test @ http://192.168.1.100:5000 2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev Latency 229.35us 125.26us 6.34ms 96.25% Req/Sec 14.53k 596.05 15.33k 94.06% Latency Distribution 50% 215.00us 75% 280.00us 90% 322.00us 99% 397.00us 292028 requests in 10.10s, 34.26MB read Requests/sec: 28915.24 Transfer/sec: 3.39MB ~$
Enterprise?
2 tools
~$ ./drill.sh http://192.168.1.100:5000 100 10 drill-chart.png
~$ ./hammer.sh http://192.168.1.100:5000 1 500 hammer-chart.png
~$
1: 0.71 ms
2: 0.69 ms
3: 0.69 ms
4: 0.65 ms
5: 0.66 ms ~$
Make it fast