#37177: Performance issue in Async Middleware handling.
--------------------------------+---------------------------------------
     Reporter:  Carlton Gibson  |                    Owner:  Jacob Walls
         Type:  Bug             |                   Status:  assigned
    Component:  HTTP handling   |                  Version:  6.0
     Severity:  Normal          |               Resolution:
     Keywords:  async           |             Triage Stage:  Accepted
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+---------------------------------------
Comment (by Natalia Bidart):

 Replying to [comment:10 Mykhailo Havelia]:
 > In production I observed somewhat different behaviour. The convoy effect
 was noticeably stronger under CPU-bound work. We found that past ~40% CPU
 utilisation, response-time degradation became non-linear, so we had to
 keep CPU usage below that threshold.

 That's a useful data point, thanks. I think non-linear degradation is
 consistent with GIL contention getting worse as CPU work rises, which my
 benchmark setup wouldn't capture: the view I used does no application
 work, so it really measures the framework/middleware floor. If you can
 share a benchmark in any reproducible form, I'd really like to measure the
 CPU-bound case directly rather than infer it.

 For reference, here's how I got mine. Single process each, default
 middleware stack, an async view that returns immediately, loaded with
 ApacheBench:
 {{{
 # WSGI for baseline sync, other port
 gunicorn -b 127.0.0.1:9000 -w 1 mysite.wsgi:application

 # ASGI
 daphne -b 127.0.0.1 -p 9001 mysite.asgi:application

 # concurrent requests (change -c 10/50/100/200)
 ab -n 8000 -c 50 http://127.0.0.1:9001/<async-view>/
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/37177#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019ee058375b-8de5cdf8-2001-4b9e-9acd-e86de68dae07-000000%40eu-central-1.amazonses.com.

Reply via email to