Skip to content

Instantly share code, notes, and snippets.

@jiajunhuang
Created January 7, 2018 03:37
Show Gist options
  • Save jiajunhuang/17cef3c9c40ffa65c68387d6a3dc9810 to your computer and use it in GitHub Desktop.
Save jiajunhuang/17cef3c9c40ffa65c68387d6a3dc9810 to your computer and use it in GitHub Desktop.
tornado, flask benchmark
jiajun@idea ~: wrk -c 2048 -d 30 -t 2 http://127.0.0.1:10086 # tornado with IOLoop
Running 30s test @ http://127.0.0.1:10086
2 threads and 2048 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 441.69ms 82.24ms 770.09ms 87.87%
Req/Sec 1.08k 507.69 2.29k 58.54%
64035 requests in 30.08s, 12.64MB read
Socket errors: connect 1029, read 0, write 0, timeout 0
Requests/sec: 2128.79
Transfer/sec: 430.33KB
jiajun@idea ~: wrk -c 2048 -d 30 -t 2 http://127.0.0.1:10086 # tornado with Gunicorn/Gevent patch
Running 30s test @ http://127.0.0.1:10086
2 threads and 2048 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 13.60ms 118.85ms 1.99s 98.56%
Req/Sec 1.32k 734.77 2.11k 67.62%
51770 requests in 30.07s, 11.21MB read
Socket errors: connect 1029, read 287, write 0, timeout 437
Requests/sec: 1721.71
Transfer/sec: 381.67KB
jiajun@idea ~: wrk -c 2048 -d 30 -t 2 http://127.0.0.1:10086 # flask with Gunicorn/Gevent patch
Running 30s test @ http://127.0.0.1:10086
2 threads and 2048 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 472.08us 7.38ms 1.51s 100.00%
Req/Sec 2.05k 704.04 2.49k 85.76%
70122 requests in 30.07s, 11.84MB read
Socket errors: connect 1029, read 0, write 0, timeout 43
Requests/sec: 2331.83
Transfer/sec: 403.07KB
jiajun@idea ~: wrk -c 2048 -d 30 -t 2 http://127.0.0.1:10086 # flask without Gunicorn/Gevent patch
Running 30s test @ http://127.0.0.1:10086
2 threads and 2048 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 101.92ms 78.87ms 1.74s 95.97%
Req/Sec 604.26 187.12 0.88k 66.18%
22014 requests in 30.08s, 3.49MB read
Socket errors: connect 1029, read 44, write 0, timeout 150
Requests/sec: 731.79
Transfer/sec: 118.63KB
workers = 1
worker_class = "gevent"
max_requests = 2048
daemon = False
loglevel = 'info'
capture_output = True
errorlog = "-"
bind = "0.0.0.0:10086"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment