Reputation: 1
I have a simple Python code to run Gevent.
Tested with Apache Benchmark with 10000 users and 5 concurrent but it's damn slow..nearly 2 seconds per request (1.419 ms) which is bad..
My code is
from gevent import wsgi, monkey
class WebServer(object):
def application(self, environ, start_response):
start_response("200 OK", [])
return ["Hello world!"]
if __name__ == "__main__":
monkey.patch_all()
app = WebServer()
wsgi.WSGIServer(('', 8888), app.application, log=None).serve_forever()
and the results are pretty horrible
Server Software:
Server Hostname: 127.0.0.1
Server Port: 8888
Document Path: /
Document Length: 12 bytes
Concurrency Level: 5
Time taken for tests: 28.379 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Total transferred: 10700000 bytes
HTML transferred: 1200000 bytes
Requests per second: 3523.73 [#/sec] (mean)
Time per request: 1.419 [ms] (mean)
Time per request: 0.284 [ms] (mean, across all concurrent requests)
Transfer rate: 368.20 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 4
Processing: 0 1 0.1 1 10
Waiting: 0 1 0.1 1 10
Total: 0 1 0.1 1 10
Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 1
95% 1
98% 2
99% 2
100% 10 (longest request)
why is that?? this guy got way better results than mine, with the same code http://blindvic.blogspot.it/2013/04/hello-world-gevent-vs-nodejs.html
Tell me if I'm missing something here..
I searched to see if there are any tuning to do but can't find anything.
Upvotes: 0
Views: 360
Reputation: 196
Americans use "." as the decimal point, not as a separator between thousands and hundreds. "1.419" is more than 1 and less than 2, not over 1,000.
Upvotes: 1