Request for information on client_body_in_single_buffer config option

Dilip Simha nmdilipsimha at gmail.com
Thu Feb 4 06:13:16 UTC 2016


Thank you Maxim,

Regards,
Dilip

On Wed, Feb 3, 2016 at 6:05 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Wed, Feb 03, 2016 at 10:43:06AM -0800, Dilip Simha wrote:
>
> > Hi,
> >
> > I am curious to know as to why the nginx.conf config
> > variable: client_body_in_single_buffer is turned off by default?
> >
> > Is there any performance degradation when its turned on?
> > In my understanding when this is turned on, it should help improve the
> > performance by reading the entire body in a single memcopy operation.
> Isn't
> > it?
>
> This option has both pros and cons:
>
> - on the one hand, it saves resources when you have to access
>   request body as a single memory block - e.g., via $request_body
>   variable;
>
> - on the other hand, it wastes resources when nginx is reading
>   body from client, as it has to do an extra allocation and
>   memcpy() if some parts of the body happened to be already read
>   with the request header.
>
> Additonally, right now this option does not work at all and marked
> as TODO.  See src/http/ngx_http_request_body.c for details.
>
> --
> Maxim Dounin
> http://nginx.org/
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160203/165bf3d4/attachment.html>


More information about the nginx-devel mailing list