Improving Nginx Zlib Compression Performance

As part of this How to boost Centmin Mod LEMP stack performance guide, I did some benchmark comparisons for each of the supported Centmin Mod Nginx compiler build options for GCC 4.8.5, 5.3.1, 6.3.1, 7.2.1, 8.0 and Clang 3.4.2, 4.0.1, 5.0.1, 6.0.0 with the standard default Nginx Zlib library versus Cloudflare’s Zlib performance fork library.

I did load testing benchmarks using my own custom forked version of wrk load testing tool testing gzip compressed requests so as to properly test each Zlib library https://github.com/centminmod/wrk/tree/centminmod.

As you can see, Cloudflare’s Zlib performance fork library has around 22–29% better performance than the default Centmin Mod Nginx Zlib library performance which is compiled against Zlib v1.2.11 on CentOS 7.4.

Relevant Links

https://centminmod.com - LEMP stack auto installer - Nginx HTTP/2 + ngx_pagespeed paired with MariaDB MySQL, PHP-FPM , CSF Firewall

https://centminmod.com - LEMP stack auto installer - Nginx HTTP/2 + ngx_pagespeed paired with MariaDB MySQL, PHP-FPM , CSF Firewall