Gunicorn, UWSGI Performance test

Source: Internet
Author: User
Tags server port intel core i5

Purpose, test the performance in different deployment modes.


Hardware environment

Intel Core i5-3230m CPU @ 2.60ghzx4

Memory: 7.4 GiB

Operating system: Ubuntu 14.04 64-bit


Test code (hello.py)

From bottle import bottle, run

App = Bottle ()

@app. Route ('/hello ')
def hello ():
Return "Hello world!"

if __name__ = = "__main__":
Run (app, host= ' localhost ', port=8000)


Uwsgi

Uwsgi_python--htket=:8000--workers=2--wsgi-file hello.py--callable app 2>/dev/null


Results:

Ab-c 100-n 50000 "Http://localhost:8000/hello"
This is apachebench, Version 2.3 < $Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus technology LTD, http://www.zeustech.net/
Licensed to the Apache software Foundation, http://www.apache.org/

Benchmarking localhost (Be patient)
Completed requests
Completed 10000 requests
Completed 15000 Requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 Requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:
Server Hostname:localhost
Server port:8000

Document Path:/hello
Document length:12 bytes

Concurrency level:100
Time taken for tests:3.288 seconds
Complete requests:50000
Failed requests:0
Total transferred:4550000 bytes
HTML transferred:600000 bytes
Requests per second:15206.71 [#/sec] (mean)
Time per request:6.576 [MS] (mean)
Time per request:0.066 [MS] (mean, across all concurrent requests)
Transfer rate:1351.38 [Kbytes/sec] Received

Connection Times (MS)
Min MEAN[+/-SD] Median max
Connect:0 2 1.3 2 6
Processing:1 5 1.3 4 14
Waiting:1 4 1.7 4 12
Total:4 7 0.8 6 19
Warning:the median and mean for the total time is not within a normal deviation
These results is probably not that reliable.

Percentage of the requests served within a certain time (MS)
50% 6
66% 7
75% 7
80% 7
90% 7
95% 7
98% 8
99% 11
100% (Longest request)

Gunicorn

Gunicorn-w 2 Hello:app


Results:


Ab-c 100-n 50000 "Http://localhost:8000/hello"
This is apachebench, Version 2.3 < $Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus technology LTD, http://www.zeustech.net/
Licensed to the Apache software Foundation, http://www.apache.org/

Benchmarking localhost (Be patient)
Completed requests
Completed 10000 requests
Completed 15000 Requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 Requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server software:gunicorn/19.3.0
Server Hostname:localhost
Server port:8000

Document Path:/hello
Document length:12 bytes

Concurrency level:100
Time taken for tests:8.821 seconds
Complete requests:50000
Failed requests:0
Total transferred:8600000 bytes
HTML transferred:600000 bytes
Requests per second:5668.37 [#/sec] (mean)
Time per request:17.642 [MS] (mean)
Time per request:0.176 [MS] (mean, across all concurrent requests)
Transfer rate:952.11 [Kbytes/sec] Received

Connection Times (MS)
Min MEAN[+/-SD] Median max
connect:0 0 0.3 0 7
Processing:3 18 2.0 17 34
Waiting:3 17 2.0 17 34
Total:10 18 2.0 17 36

Percentage of the requests served within a certain time (MS)
50% 17
66% 17
75% 18
80% 18
90% 19
95% 23
98% 23
99% 24
100% (Longest request)


Summarize

Scheme
Concurrent
Maximum response time (MS)
Uwsgi
15206 19
Gunicorn 5668 36





Gunicorn, UWSGI Performance test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.