Open djay opened 12 years ago
Hi Jay
Very interesting, if you have the same RPS and a lower STPS, I suppose that you have test or request failures that should pinpoint a problem. I will try to find some time to test the gevent patch
Thanks
ben
I don't think its due to errors. but I haven't been able to work out what is going on. Since it's turning the whole bench into a single thread it could be just the ordering of things. For instance, the timings might need to be done in such a way that the end of request time is recorded, control handed back, then the setting up of the next request happens. This is because anything CPU delay the other greenlets from recording their end time.
In theory using async io should result in being able to handle many more concurrent connections that python threads. For example Locust uses this (https://github.com/cgbystrom/locust) and Tsung. To test this out I integrated gevent by adding the following line to the top of BenchRunner.py:
The result was a 40-50% decrease in cpu usage however the stats recorded weren't the same. Most dramatic was the STPS dropped from 120 down to 75. I think something changed in how the killing of the thread occurred. It looks like the gevent ran only 43 tests whereas without ran 76 tests in the same 60 duration. Generally longer request duration were recorded but the rps was similar.
More investigation is needed.