Open jefer94 opened 5 months ago
Great work, and a thorough test scheme I would very much want to add to our CI testing.
template_query 0 requests
That is just sqlite, right?
gateway_10s 5 requests
A request that deliberately sleeps for 10 seconds.. managed to return before a 10 second hard limit? Did you mean for that to fail reliably and the timeout needs to be >= 1 second from what the test says for wrk
to not overcount?
Just SQLite, mmm, maybe it should have 7s. 😂
I'd be happy to see my benchmark in your CI, it was made to compare all worker classes available in Django. My idea was all common tasks in a test..
As all know, the devil, I mean, GIL, should die in Python 3.13, and should be great to check that Gunicorn works on the proper way, it should arrive in 5 months.
If you want more context https://github.com/python/cpython/issues/118874
Gunicorn didn't get more performance with threads, but the execution with workers got x2 in perf, I suppose that the workers require some tweaks.
Summary
base
https://github.com/breatheco-de/apiv2/tree/main/benchmarks/django-workers
benchmark
Requests per seconds result
Django Workers
ASGI Gunicorn Uvicorn, with threads -Xgil=0
JSON performance
Sync
Async
Queries returned as JSON
Sync
Async
Queries returned as HTML
Sync
Async
Simulate a request 1s inside the server, then return a JSON
Sync
Async
Simulate a request 3s inside the server, then return a JSON
Sync
Async
Simulate a request 10s inside the server, then return a JSON
Sync
Async
Brotli
Sync
Async
ASGI Gunicorn Uvicorn, with threads -Xgil=1
JSON performance
Sync
Async
Queries returned as JSON
Sync
Async
Queries returned as HTML
Sync
Async
Simulate a request 1s inside the server, then return a JSON
Sync
Async
Simulate a request 3s inside the server, then return a JSON
Sync
Async
Simulate a request 10s inside the server, then return a JSON
Sync
Async
Brotli
Sync
Async
ASGI Gunicorn Uvicorn, with workers -Xgil=0
JSON performance
Sync
Async
Queries returned as JSON
Sync
Async
Queries returned as HTML
Sync
Async
Simulate a request 1s inside the server, then return a JSON
Sync
Async
Simulate a request 3s inside the server, then return a JSON
Sync
Async
Simulate a request 10s inside the server, then return a JSON
Sync
Async
Brotli
Sync
Async
ASGI Gunicorn Uvicorn, with workers -Xgil=1
JSON performance
Sync
Async
Queries returned as JSON
Sync
Async
Queries returned as HTML
Sync
Async
Simulate a request 1s inside the server, then return a JSON
Sync
Async
Simulate a request 3s inside the server, then return a JSON
Sync
Async
Simulate a request 10s inside the server, then return a JSON
Sync
Async
Brotli
Sync
Async