Welcome! Log In Create A New Profile

Advanced

Re: The truth about gzip_buffers?

Maxim Dounin
May 20, 2013 07:28AM
Hello!

On Sat, May 18, 2013 at 09:02:14AM -0400, spdyg wrote:

> Reading the docs on nginx.org and searching around, it seems there's no
> consensus on how we should configure gzip_buffers.

Just keep the default?

> Some guides say that the total buffer needs to be greater than any file you
> want to gzip, or it will either not gzip the file or truncate it (I'm sure
> this is not true though!). Other guides suggest arbitrary values.
>
> I guess I have a couple of questions to clear up this confusion:
>
> 1. What happens if the response is greater than the total gzip buffer. Will
> it simply keep the upstream connection open longer while it fills, gzips and
> transmits the buffers multiple times?

Rest of the response will be kept till some buffers are sent to
the client.

Keeping upstream connection open is generally irrelevant - it
depends mostly on proxy_buffers/proxy_max_temp_file_size - but
might happen in some configurations.

> 2. If your page size is 4k, does that mean for best efficiency shoudl you
> keep the size of the buffers to 4k, but just increase the total number of
> buffers? What is the consideration here?

Much like with other buffers in nginx, small buffers means better
memory utilization, but larger buffers might result in smaller CPU
usage as there are some amount of work done per-buffer.

> 3. Would having larger buffer sizes potentially allow greater compression
> because each buffer is compressed individually?

No.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

The truth about gzip_buffers?

spdyg May 18, 2013 09:02AM

Re: The truth about gzip_buffers?

Maxim Dounin May 20, 2013 07:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 3 on January 21, 2018
Record Number of Guests: 156 on January 19, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready