-
- # gunicorn with 2 workers / gunicorn -w 2 gunicorn_test:app -b unix:/tmp/gunicorn.sock
- $ ab -c 100 -n 1000 http://127.0.0.1:81/
- This is ApacheBench, Version 2.3 <$Revision: 655654 $>
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Licensed to The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking 127.0.0.1 (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Completed 1000 requests
- Finished 1000 requests
-
-
- Server Software: nginx
- Server Hostname: 127.0.0.1
- Server Port: 81
-
- Document Path: /
- Document Length: 14 bytes
-
- Concurrency Level: 100
- Time taken for tests: 0.182 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 173000 bytes
- HTML transferred: 14000 bytes
- Requests per second: 5493.15 [#/sec] (mean)
- Time per request: 18.205 [ms] (mean)
- Time per request: 0.182 [ms] (mean, across all concurrent requests)
- Transfer rate: 928.04 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 0 0.7 0 4
- Processing: 1 17 3.3 18 20
- Waiting: 1 17 3.4 18 20
- Total: 5 17 2.7 18 20
-
- Percentage of the requests served within a certain time (ms)
- 50% 18
- 66% 18
- 75% 19
- 80% 19
- 90% 19
- 95% 19
- 98% 20
- 99% 20
- 100% 20 (longest request)
-
- # gunicorn with 2 meinheld workers / gunicorn -k "egg:meinheld#gunicorn_worker" -w 2 gunicorn_test:app -b unix:/tmp/gunicorn.sock
- $ ab -c 100 -n 1000 http://127.0.0.1:81/
- This is ApacheBench, Version 2.3 <$Revision: 655654 $>
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Licensed to The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking 127.0.0.1 (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Completed 1000 requests
- Finished 1000 requests
-
-
- Server Software: nginx/1.0.0
- Server Hostname: 127.0.0.1
- Server Port: 81
-
- Document Path: /
- Document Length: 13 bytes
-
- Concurrency Level: 100
- Time taken for tests: 0.076 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 155155 bytes
- HTML transferred: 13013 bytes
- Requests per second: 13148.73 [#/sec] (mean)
- Time per request: 7.605 [ms] (mean)
- Time per request: 0.076 [ms] (mean, across all concurrent requests)
- Transfer rate: 1992.28 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 1 0.8 1 4
- Processing: 1 6 1.9 6 13
- Waiting: 1 6 1.9 5 13
- Total: 3 7 1.8 7 13
-
- Percentage of the requests served within a certain time (ms)
- 50% 7
- 66% 7
- 75% 8
- 80% 9
- 90% 10
- 95% 10
- 98% 12
- 99% 13
- 100% 13 (longest request)
-
- # gunicorn with 2 gevent workers / gunicorn -k gevent -w 2 gunicorn_test:app -b unix:/tmp/gunicorn.sock
- $ ab -c 100 -n 1000 http://127.0.0.1:81/
- This is ApacheBench, Version 2.3 <$Revision: 655654 $>
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Licensed to The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking 127.0.0.1 (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Completed 1000 requests
- Finished 1000 requests
-
-
- Server Software: nginx/1.0.0
- Server Hostname: 127.0.0.1
- Server Port: 81
-
- Document Path: /
- Document Length: 13 bytes
-
- Concurrency Level: 100
- Time taken for tests: 0.193 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 155000 bytes
- HTML transferred: 13000 bytes
- Requests per second: 5177.48 [#/sec] (mean)
- Time per request: 19.314 [ms] (mean)
- Time per request: 0.193 [ms] (mean, across all concurrent requests)
- Transfer rate: 783.70 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 0 0.6 0 3
- Processing: 1 18 6.9 18 37
- Waiting: 1 18 6.9 18 37
- Total: 4 18 6.7 18 37
-
- Percentage of the requests served within a certain time (ms)
- 50% 18
- 66% 22
- 75% 23
- 80% 24
- 90% 26
- 95% 29
- 98% 35
- 99% 37
- 100% 37 (longest request)
-
- # gunicorn with 8 gevent workers / gunicorn -k gevent -w 8 gunicorn_test:app -b unix:/tmp/gunicorn.sock
- $ ab -c 100 -n 1000 http://127.0.0.1:81/
- This is ApacheBench, Version 2.3 <$Revision: 655654 $>
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Licensed to The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking 127.0.0.1 (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Completed 1000 requests
- Finished 1000 requests
-
-
- Server Software: nginx/1.0.0
- Server Hostname: 127.0.0.1
- Server Port: 81
-
- Document Path: /
- Document Length: 13 bytes
-
- Concurrency Level: 100
- Time taken for tests: 0.115 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 155142 bytes
- HTML transferred: 13000 bytes
- Requests per second: 8671.00 [#/sec] (mean)
- Time per request: 11.533 [ms] (mean)
- Time per request: 0.115 [ms] (mean, across all concurrent requests)
- Transfer rate: 1313.71 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 3 1.0 2 6
- Processing: 1 8 2.2 8 18
- Waiting: 1 7 2.1 7 15
- Total: 4 11 2.2 11 21
-
- Percentage of the requests served within a certain time (ms)
- 50% 11
- 66% 12
- 75% 12
- 80% 13
- 90% 14
- 95% 15
- 98% 16
- 99% 17
- 100% 21 (longest request)
-
- # uwsgi 8 processes / uwsgi -s /tmp/uwsgi.sock -L -l 1000 -M -p 8 -O2 --home ~/ve/meinheld -w gunicorn_test:app
- $ ab -c 100 -n 1000 http://127.0.0.1:82/
- This is ApacheBench, Version 2.3 <$Revision: 655654 $>
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Licensed to The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking 127.0.0.1 (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Completed 1000 requests
- Finished 1000 requests
-
-
- Server Software: nginx/1.0.0
- Server Hostname: 127.0.0.1
- Server Port: 82
-
- Document Path: /
- Document Length: 13 bytes
-
- Concurrency Level: 100
- Time taken for tests: 0.083 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Total transferred: 155155 bytes
- HTML transferred: 13013 bytes
- Requests per second: 12114.75 [#/sec] (mean)
- Time per request: 8.254 [ms] (mean)
- Time per request: 0.083 [ms] (mean, across all concurrent requests)
- Transfer rate: 1835.61 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 1 0.6 1 3
- Processing: 1 7 1.1 7 9
- Waiting: 1 7 1.1 7 8
- Total: 4 8 0.8 8 10
-
- Percentage of the requests served within a certain time (ms)
- 50% 8
- 66% 8
- 75% 8
- 80% 8
- 90% 9
- 95% 9
- 98% 9
- 99% 10
- 100% 10 (longest request)
-
-
- # gunicorn with 2 meinheld workers (ab w/keep-alives) / gunicorn -k "egg:meinheld#gunicorn_worker" -w 2 gunicorn_test:app -b unix:/tmp/gunicorn.sock
- $ ab -k -c 100 -n 1000 http://127.0.0.1:81/
- This is ApacheBench, Version 2.3 <$Revision: 655654 $>
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Licensed to The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking 127.0.0.1 (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Completed 1000 requests
- Finished 1000 requests
-
-
- Server Software: nginx/1.0.0
- Server Hostname: 127.0.0.1
- Server Port: 81
-
- Document Path: /
- Document Length: 13 bytes
-
- Concurrency Level: 100
- Time taken for tests: 0.050 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Keep-Alive requests: 1000
- Total transferred: 160160 bytes
- HTML transferred: 13013 bytes
- Requests per second: 20079.51 [#/sec] (mean)
- Time per request: 4.980 [ms] (mean)
- Time per request: 0.050 [ms] (mean, across all concurrent requests)
- Transfer rate: 3140.56 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 0 0.6 0 3
- Processing: 1 4 1.6 4 8
- Waiting: 1 4 1.6 4 8
- Total: 2 5 1.7 4 8
-
- Percentage of the requests served within a certain time (ms)
- 50% 4
- 66% 5
- 75% 6
- 80% 7
- 90% 7
- 95% 7
- 98% 8
- 99% 8
- 100% 8 (longest request)
-
- # uwsgi 8 processes (ab w/keep-alives) / uwsgi -s /tmp/uwsgi.sock -L -l 1000 -M -p 8 -O2 --home ~/ve/meinheld -w gunicorn_test:app
- ab -k -c 100 -n 1000 http://127.0.0.1:82/
- This is ApacheBench, Version 2.3 <$Revision: 655654 $>
- Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
- Licensed to The Apache Software Foundation, http://www.apache.org/
-
- Benchmarking 127.0.0.1 (be patient)
- Completed 100 requests
- Completed 200 requests
- Completed 300 requests
- Completed 400 requests
- Completed 500 requests
- Completed 600 requests
- Completed 700 requests
- Completed 800 requests
- Completed 900 requests
- Completed 1000 requests
- Finished 1000 requests
-
-
- Server Software: nginx/1.0.0
- Server Hostname: 127.0.0.1
- Server Port: 82
-
- Document Path: /
- Document Length: 13 bytes
-
- Concurrency Level: 100
- Time taken for tests: 0.070 seconds
- Complete requests: 1000
- Failed requests: 0
- Write errors: 0
- Keep-Alive requests: 1000
- Total transferred: 160480 bytes
- HTML transferred: 13039 bytes
- Requests per second: 14333.84 [#/sec] (mean)
- Time per request: 6.976 [ms] (mean)
- Time per request: 0.070 [ms] (mean, across all concurrent requests)
- Transfer rate: 2246.38 [Kbytes/sec] received
-
- Connection Times (ms)
- min mean[+/-sd] median max
- Connect: 0 0 0.7 0 4
- Processing: 1 6 1.1 7 7
- Waiting: 1 6 1.1 7 7
- Total: 3 7 0.7 7 9
-
- Percentage of the requests served within a certain time (ms)
- 50% 7
- 66% 7
- 75% 7
- 80% 7
- 90% 7
- 95% 7
- 98% 7
- 99% 7
- 100% 9 (longest request)
-
- # nginx.conf
- upstream gunicorn_server {
- server unix:/tmp/gunicorn.sock fail_timeout=0;
- }
-
- server {
- server_name localhost;
- listen 127.0.0.1:81;
- access_log off;
- keepalive_timeout 5;
- location / {
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_redirect off;
- proxy_pass http://gunicorn_server;
- proxy_buffering off;
- }
- }
-
- server {
- server_name localhost;
- listen 127.0.0.1:82;
- access_log off;
- keepalive_timeout 5;
- location / {
- uwsgi_pass unix:/tmp/uwsgi.sock;
- include uwsgi_params;
- }
- }
-
- # gunicorn_test.py
- def app(environ, start_response):
- data = "Hello, World!"
- start_response("200 OK", [
- ("Content-Type", "text/plain"),
- ("Content-Length", str(len(data)))
- ])
- return iter([data])
-