New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Guide to improving Centmin Mod LEMP performance
Seeing as there are some folks here using my Centmin Mod LEMP stack, I thought I'd share a quick guide I wrote for configuration tips to improve performance beyond the out of box automatic optimisations already done. In theory these configuration tips can provide an additional 5-40% improvement in some areas https://community.centminmod.com/threads/13776/
If you haven't tried latest beta then quick install & setup instructions at https://community.centminmod.com/threads/quick-centmin-mod-install-nginx-vhost-site-mysql-database-setup.12904/
Enjoy ^_^
Comments
Nice! Thanks for sharing
Awesome!
Thanks. centminmod has been a standard installation for all the VPSes I have.
@eva2000 How does Cloudflare's Zlib performance fork library compare against Brotli?
Edit___
I will later on test this and compare speed, cpu usage and file size.
You're welcome guys
@vovler I just updated Centmin Mod 123.09beta01 to extend cloudflare zlib library to PHP-FPM's zlib library usage as well https://community.centminmod.com/threads/add-cloudflare_zlibphp-variable-to-use-cloudflare-zlib-fork-for-php-compiles.13814/ so that PHP-FPM can benefit from the speedup
The question of brotli vs cloudflare zlib for php usage was brought up on my forums as xenforo's php uses zlib for text compression but Centmin Mod Nginx supports ngx_brotli for https brotli compression instead of zlib/gzip and for xenforo to serve static files via brotli compression, users need to disable zlib in xenforo. So question brotli vs zlib/gzip for nginx and php usage which is better ?
I did start testing cloudflare zlib side with wrk load tests for nginx cloudflare zlib for compression level scaling from levels 1-9 https://community.centminmod.com/threads/add-cloudflare_zlibphp-variable-to-use-cloudflare-zlib-fork-for-php-compiles.13814/#post-58679. Then all that is left is to do the same for ngx_brotli but now realise to test ngx_brotli you need https enabled site and my testing has been on non-https. So will need to retest on https enabled site/config for that.
@vovler
Quick benchmarks done for Centmin Mod Nginx HTTPS based target site for Cloudflare zlib compressed requests versus Google ngx_brotli compressed requests https://community.centminmod.com/threads/nginx-with-cloudflare-zlib-fork-vs-nxg_brotli-compression-level-tests.13820/
I only see the results for the zlib, are the brotli bechmarks somewhere else?
1st post zlib, 2nd post brotli, 3rd post zlib vs brotli for compression level 5 & 6
Thats great. And how should we interpret these results, please?
Thats great. And how should we interpret these results, please?
Centmin Mod Ngixn 1.13.8 + cloudflare zlib > Centmin Mod Ngixn 1.13.8 ngx_brotli
Well, not necessarly. It you are serving dynamic content then yes, brotli is heavier on the cpu and it's most likely not worth it. But if you are serving static content, brotli won't represent any downsides, IMO.
As I interpret it, in case of something as Wordpress, zlib is friendlier to the CPU. In case of static website, brotli.
But I do think there is something wrong with brotli_comp_level 1, as it outperforms all other brotli & zlib compression levels. @eva2000
I noticed such a disparity amongst different zlib compression level results also. Maybe its just about using CPU either for serving pages or for compressing data.
@eva2000 Let me know when you're interested in supporting Debian, because many folks don't care for that distribution. I'd be happy to help.
Most of us use Logan Paul Linux anyways
Look at the uncompressed vs compressed page size, latency response time and requests/s. But essentially cloudflare zlib > brotli for on the fly dynamic compression of requests as opposed to static pre-compressed assets. I did compression algorithm benchmarks for ztsd, gzip, pigz, bzip2, lbzip2, and brotli along with others at https://community.centminmod.com/threads/compression-comparison-benchmarks-zstd-vs-brotli-vs-pigz-vs-bzip2-vs-xz-etc.12764/
At first i thought so, then I re-read my old compression benchmarks and you see brotli level 1 is actually faster than gzip https://community.centminmod.com/threads/compression-comparison-benchmarks-zstd-vs-brotli-vs-pigz-vs-bzip2-vs-xz-etc.12764/
believe it's the nature of brotli itself (or ngx_brotli implementation in nginx) and maybe factor of the type of file it's compressing - in this case index.html page default for Centmin Mod Nginx installs
hehe - Official FAQ item 12 https://centminmod.com/faq.html - possibility but way into the future - haven't fleshed out the feature set for CentOS Centmin Mod as yet - still plenty to do. Public dev dashboard on Github of maybe 1/3 rd of what I have planned https://github.com/centminmod/centminmod/projects/1 ^_^
For a Debian version definitely will leverage LET folks feedback and experience though
Any news on Litespeed integration? This said, with the generally better performance of CMM does Litespeed would bring even a meaningful advantage?
Yes LiteSpeed/OpenLiteSpeed integration is still on the books, just limitation is time as I only work on Centmin Mod in my spare time. LiteSpeed/OpenLiteSpeed has it's own benefits i.e. LSAPI PHP > PHP-FPM in terms of scaling and performance and native .htaccess support for folks who require it as not everyone is a nginx rewrite rule master
FYI, updated the improvement guide to also mention leveraging Nginx thread pool which Centmin Mod Nginx supports out of the box for up to 9x fold performance improvements
FYI, to make accessing and remembering the link to this thread easier, I created 2 short url links below. Bookmark worthy candidates
Is there a Ubuntu/Debian alternative for this?
You mean for all these linked performance boosting configuration tips ? I doubt you'll find them in any LEMP/LNMP stack out there whether it will be CentOS or Ubuntu/Debian right now at least. Centmin Mod LEMP stack is unique this way ^_^
Cool, Im too used to Debian/Ubuntu since I started using them back in the days.
It would be awesome to have such high performing LEMP/LNMP stack on Debian/Ubuntu tbh.
I'm going to test Centminmod for a few managed wp websites I host
Let's see if I get a bit of a performance boost compared to regular shared hosting hehe :P
You will be pleasantly surprised.
Me too... I am "religiously married to Debian" since years... and it would be awesome to test a perform-ant LEMP stack on Debian
well if you're ever bored in the marriage and itchy for some side action https://community.centminmod.com/threads/quick-centmin-mod-install-nginx-vhost-site-mysql-database-setup.12904/
Remember if you run in issues or questions or just want to learn more about Centmin Mod, check out and join the official community forums -
there's heaps of info there https://community.centminmod.com/ ^_^
FYI, Centmin Mod 123.09beta01 updated yesterday to implement some of the performance config tips by default out of the box now - i.e. switch to GCC 7.21 compiled Nginx with OpenSSL 1.1.0g + enable Cloudflare zlib performance patch https://community.centminmod.com/threads/how-to-boost-centmin-mod-lemp-stack-performance.13776/#post-60138
That's an extra 20-40% performance for Nginx for free ^_^
Does centminmod has multiple user support ?
Current version of Centmin Mod isn't made for shared hosting like cPanel it's for one user managing many of their own trusted web sites only - see FAQ item 2 https://centminmod.com/faq.html and preview of future implementations of shared hosting support that I had tried my hand at here https://community.centminmod.com/threads/jailed-chrooted-sftp-ssh-user-nginx-vhost-menu.8/.
Shared users is probably something I will tackle after I nail down the feature set in latest beta development and my to do list. You can see public development dashboard at https://github.com/centminmod/centminmod/projects/1
Just updated my guide with latest option for better performance with Centmin Mod LEMP stack = HTTPS TLS 1.3 support via either newly released OpenSSL 1.1.1 TLS 1.3 or BoringSSL TLS 1.3. I love my speed
List of sites and info regarding TLS 1.3
FYI, BoringSSL and OpenSSL 1.1.1's ECDSA performance is up to 50-60% faster than OpenSSL 1.1.0/1.0.2 branch and up to 280% faster than LibreSSL 2.7 ! Paired with ECC 256bit ECDSA SSL certificates = more performance and scalability ^_^