Please sign in to comment.
revert ngx_brotli auto enable for intel skylake cpus in 123.09beta01
- Previously auto enabled ngx_brotli when intel skylake cpus were detected https://community.centminmod.com/threads/enable-nginx-brotli-module-on-intel-skylake-newer-cpus-in-123-09beta01.16553/ but that was under a flawed assumption that intel skylake cpus accelerated broti compressed http requests compared to gzip compressed http requests. The acceleration didn't come from intel skylake cpus but from an ngx_brotli configuration setting update did at https://community.centminmod.com/threads/only-use-brotli-compression-for-files-greater-than-64kb-in-123-09beta01.15951/ which changed brotli_min_length from 1000 to 65536 bytes so that Brotli compression is only used for files greater than 64KB when NGXDYNAMIC_BROTLI='y' and NGINX_LIBBROTLI='y' set https://community.centminmod.com/threads/nginx-config-suggestions.15950/#post-68317. The incorrect assumption was that brotli_min_length from 1000 to 65536 bytes change would switch to gzip compression if file was under 65536 bytes in length and only brotli compress files greater than 65536 bytes. When in fact what happens is that any files under 65536 bytes will end up without any form of compression and not switch back to gzip. So when you test brotli encoded requests for files under 65536 bytes, ngx_brotli serves them uncompressed instead of the flawed assumption that it will fallback to gzip. This meant that benchmarks on intel skylake cpus which happen to test files less than 65536 bytes ended up serving the file uncompressed which meant it's performance was better than compared gzip compressed encoded http requests for the same file. - When brotli_min_length was changed back from 65536 bytes to 1400 bytes, then files under 65536 bytes and over 1400 bytes were then properly brotli compressed for brotli encoded http requests were made. However, the performance throughput was about 1/5th of gzip compressed performance in terms of requests/s throughput for on the fly dynamic brotli vs gzip. - As such this commit update corrects some of the incorrect assumptions by first changing brotli_min_length back from 65536 bytes to 1400 bytes so that files under 65536 are properly brotli compressed again instead being served uncompressed and leaves ngx_brotli enabling up to end user to optionally enable again https://community.centminmod.com/threads/how-to-use-brotli-compression-for-centmin-mod-nginx-web-servers.10688/ and disables ngx_brotli by default otherwise. - You can always reduce the brotli compression level default from 5 to 4 by manually editing the settings in /usr/local/nginx/conf/brotli_inc.conf and restart nginx service to improve brotli requests/s throughput by ~90%. This comparatively improves brotli on the fly compression throughput performance in terms of requests/s from 1/5th the speed of gzip to 1/4th the speed of gzip. So brotli on the fly performance is still slower than gzip but still improved. However, resulting brotli compressed files maybe slightly larger in some instances than gzip compressed file as seen below for jquery file bit larger but index.html bit smaller compressed file.
- Loading branch information...
Showing with 8 additions and 8 deletions.