what could prevent gzip_comp_level from chaning?

Tim Garnett lists at ruby-forum.com
Sat Feb 27 00:17:33 MSK 2010

Hi all,

According to yslow I seem to get the exact same size gzipped version of
the page no matter what I set gzip_comp_level to. Does anyone know why
that might be the case?  This is for the page html (generated by
mongrel) so not static content and I've checked a couple of different
pages (some several hundred kb in size where I'd expect to see some
difference) restarting nginx each time I changed the config file.  I've
included the output of nginx -V and the relevant portion of the nginx
config below.


http {
  # gzip settings - compression saves bandwidth, 256 * 16 => 4mb max
  # file size (actual max? seem like it streams through and still
  # even when doesn't fit as we used to have this much smaller and it
  # seem to prevent large pages from getting gzipped...)
  gzip on;
  gzip_min_length 512;
  gzip_buffers 256 16k;
  # FIXME - good compression level? Tradeoff of servertime/serverload
  # bandwidth/downloadtime
  gzip_comp_level 6;
  gzip_proxied any;
  # note that text/html is always gzipped
  gzip_types text/plain text/css application/x-javascript
application/xml+rss text/javascript;
  # with gzip_static on we can pre-compress our static files rather then
  # recompressing them over and over again on the fly. All we need is
  # versions of the files in the same locations with identical
  gzip_static on;
  # FIXME - I'm not sure if we should be setting these or not, for now
  # defaults are reasonable

  # Response Buffers - buffers requests from the servers to the client
  # (freeing up the servers from slow clients).  On by default but we
  # reiterate for clarity.
  # 1024 * 16kb => 16mb max memory bufferable request response size.
  proxy_buffering on;
  proxy_buffers 1024 16k;
  # initial buffer size
  proxy_buffer_size 8k;
  # disable buffering to disk if response size exceeds proxy_buffers (so
  # stream from mongrel if memory size is exceeded), if non-zero this is
  # max size that will be buffered to disk
  # FIXME - we've made the memory cache size gigantic to compensate
(since we
  # do still rarely serve very, very large pages).
  proxy_max_temp_file_size 0;

$ nginx -V
nginx version: nginx/0.7.65
built by gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
TLS SNI support disabled
configure arguments: --prefix=/usr/local/pkg/nginx-0.7.65
--with-md5=/usr/lib --http-log-path=/var/log/nginx/nginx_access.log
--error-log-path=/var/log/nginx/nginx_error.log --with-http_ssl_module
--with-http_flv_module --with-http_sub_module --user=www-data
--group=www-data --pid-path=/var/run/nginx.pid
--conf-path=/etc/nginx/nginx.conf --with-http_gzip_static_module

$ sudo nginx -t
the configuration file /etc/nginx/nginx.conf syntax is ok
configuration file /etc/nginx/nginx.conf test is successful
Posted via http://www.ruby-forum.com/.

More information about the nginx mailing list