I'll give it a try once 1.9.12 is out.

AFAIK uWSGI is blocking and this is the cause of offload threads, this is
fine for dynamic requests that needs to run app code, but it also means
that uWSGI will probably do worse that lighttpd or nginx in real world
contest with serving static files under a lot of load and few thousands
client connections. AFAIK both lighttpd and nginx are asynchronous. It
isn't big issue since we can put uWSGI behind nginx and use it only for
non-static requests, but since HTTP frontend is getting more features I
wonder what's the goal here, is uWSGI intended to be as fast as others (or
maybe it is already), or nginx will always be required when maximum
possible performance is required?


2013/6/2 Roberto De Ioris <[email protected]>

>
> > We could also buffer everything to offload thread memory buffer by
> default
> > and if buffer hits maximum size we could switch to temporary file (?)
> > Just the idea of pushing every response immediately to offload thread so
> > that once it's done worker can process another request, while the offload
> > thread handles delivering our response to the client, seems nice for me.
> >
>
> I have committed to "offload" transformation (it will be built by default
> from 1.9.12).
>
> It is not too much complex:
>
>
> https://github.com/unbit/uwsgi/blob/master/plugins/transformation_offload/offload.c
>
> Basically if you add --route-run offload:
>
> the write of the response will be offloaded.
>
> By default after the response grows over 1 MB it will start being buffered
> to disk (and the offload will became a sendfile() offload)
>
> You can tune that value passing the number of bytes to the offload:
>
> --route-run offload:100
>
> will buffer to disk after 100 bytes
>
>
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>



-- 
Łukasz Mierzwa
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to