Welcome! Log In Create A New Profile

Advanced

Re: Request for information on client_body_in_single_buffer config option

Maxim Dounin
February 03, 2016 09:08PM
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@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Request for information on client_body_in_single_buffer config option

Dilip Simha 581 February 03, 2016 01:44PM

Re: Request for information on client_body_in_single_buffer config option

Maxim Dounin 255 February 03, 2016 09:08PM

Re: Request for information on client_body_in_single_buffer config option

Dilip Simha 288 February 04, 2016 01:14AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 108
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready