-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
newer versions benchmarks #2
Comments
Interesting, thanks for contributing. I'll leave this open to make it easier to find for others. |
all benchmarks updated. |
Could you double check your numbers? See: hail-is/hail#5242 ; on Sanic's latest version, got very different results, and in general was quite surprised by the reversal in performance order once a 3rd party asyncio library was introduced. At first blush data reversals like this suggest some testing issue. @cllty show for instance that aiohttp was just faster than Sanic, consistently. Your updated bench shows Sanic is 2x faster, and then gets 5x slower. This is obviously surprising. My results show a consistent 2x benefit in favor of Sanic. |
Sorry, are you asking me to update the numbers in the readme, or asking about the numbers above? Please could you provide your numbers for comparison. Probably need to update all the benchmarks again, the most recent are from 6 months ago. |
Sure!
I'm asking about the numbers in the readme. Your bench looks fine, but I'm trying to distinguish between 3 possibilities:
|
(edited your comment to make it readable. Really helpful if you can take a second to make these things easily readable) Afraid I don't have time to look into this right now, but I would:
|
Thanks. My request is that you try to re-run the test with Sanic >= .7. This is the first link that comes up when you Google Sanic vs aiohttp. The results are either not reproducible, as suggested by @cllty's tests (assuming he was also using 0.7), or no longer relevant as suggested by mine. In general any time you see a dramatic reversal in the order of results, for non-obvious reasons you should be skeptical.
This is supposed to be fixed in 0.8. |
As a followup, I re-ran this with Sanic == 0.7 , aiohttp == 3.4.0 Running 1m test @ http://localhost:8000/db #sanic
12 threads and 2000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 866.81ms 1.16s 8.00s 85.73%
Req/Sec 350.21 95.11 790.00 69.88%
250043 requests in 1.00m, 38.02MB read
Socket errors: connect 0, read 198, write 3, timeout 204
Requests/sec: 4163.47
Transfer/sec: 648.24KB Running 1m test @ http://localhost:8000/db #sanic run 2
12 threads and 2000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 628.16ms 918.78ms 7.89s 86.06%
Req/Sec 361.21 114.42 1.49k 77.14%
255946 requests in 1.00m, 38.82MB read
Socket errors: connect 0, read 2126, write 0, timeout 33
Requests/sec: 4258.64
Transfer/sec: 661.49KB Running 1m test @ http://localhost:8000/db #sanic run 3
12 threads and 2000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 692.16ms 982.13ms 7.94s 86.28%
Req/Sec 346.24 102.01 1.58k 74.05%
244206 requests in 1.00m, 37.25MB read
Socket errors: connect 0, read 2093, write 0, timeout 40
Requests/sec: 4063.21
Transfer/sec: 634.74KB ---- aiohttp --- Running 1m test @ http://localhost:8000/db #aiohttp
12 threads and 2000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 851.56ms 1.27s 7.98s 85.64%
Req/Sec 285.13 100.04 1.51k 79.29%
201761 requests in 1.00m, 36.86MB read
Socket errors: connect 0, read 2050, write 0, timeout 407
Requests/sec: 3357.16
Transfer/sec: 628.10KB Running 1m test @ http://localhost:8000/db #aiohttp run 2
12 threads and 2000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 884.92ms 1.28s 8.00s 85.73%
Req/Sec 286.07 90.03 1.20k 74.28%
202530 requests in 1.00m, 36.95MB read
Socket errors: connect 0, read 2052, write 0, timeout 398
Requests/sec: 3370.01
Transfer/sec: 629.52KB Running 1m test @ http://localhost:8000/db #aiohttp run 3
12 threads and 2000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 842.50ms 1.23s 7.98s 85.58%
Req/Sec 299.52 95.83 1.22k 73.82%
211231 requests in 1.00m, 38.61MB read
Socket errors: connect 0, read 2094, write 0, timeout 285
Requests/sec: 3514.60
Transfer/sec: 657.86KB There is something deeply strange with your results. |
Ok, looked into this and the problem was the file descriptor limit, running
Which basically agrees with your numbers: sanic is 20% to 35% quicker. I'll update the benchmarks. |
@samuelcolvin I really appreciate your time! That makes much more sense. Also, it looks like you're using a machine whose CPU has much better IPC. I'm on a 2017 3.1ghz MacBook and have half the throughput! |
No problem, thanks for pointing this out. There was a hint in the output: there were always 983 socket connect errors. Basically, it opened nearly 1024 connections, then couldn't open any more. |
Great catch. |
I ran the benchmarks with the latest versions of all frameworks (for japronto it's still the same
v0.1.1
).Version: python3.6
Here are my hardware specs:
MacBook Pro 2014
SSD storage
Processor 2.6 GHz Intel Core i5
RAM 8 GB
Aiohttp
Sanic
I ran into lots of issues with
japronto
, in the end I didn't bother going ahead with it as it's not a serious framework. But the latest show performance improvements in aiohttp.The text was updated successfully, but these errors were encountered: