A quick showdown between LiteSpeed and NGINX…two of the greatest high-performance web servers.
What’s the history behind LiteSpeed and NGINX? Which one is faster? Which one handles more traffic? Which one is better for you?!
Read on and find out…
Which one is faster? (OpenLiteSpeed or NGINX?)
I really intended for this guide to be comprehensive. I really did. I put together testing servers and everything. Signed up for different NGINX stacks and compared them against OLS. I’m just like you and everyone else. I wanted to know what their real-world performance was. How fast they were out of the box. I didn’t care about all the micro-improvements made to get there. I pit them side-by-side in the most unbiased controlled testing environment possible. I’m no expert but did my best to provide what I thought was fair testing. I also made benchmark charts and what not.
Testing setup:
- Stacks compared – OLS running off CyberPanel vs 3 variants of NGINX (RunCloud, GridPane, SpinupWP)
- Datacenter – all were using Linode except for SpinupWP (using Digital Ocean) because setup was clunky with any provider other than DO. Sure, I could have figured it out but with the time I spent I can assure you most newbies won’t have been able to. So too bad!
- Stack configurations – all running the latest version of PHP 7.3, mariaDB, blah blah blah. RunCloud had a months-older PHP 7.3.4 (instead of latest PHP 7.3.8). I used out of the box configurations without trying to tweak or tune anything to their best settings. Whatever they came out of the box with is what they get.
- Caching configurations compared – OLS, I tested with LS cache on and off. NGINX, I compared with FastCGI caching on and off. GridPane only allowed REDIS object caching for the cheap plan so that’s what I tested. RunCloud, I couldn’t enable FastCGI caching after trying configurations for 30 minutes so too bad, I will assume most users won’t be able to either and I tested it without FCGI.
- Load test used – loader.io, I put 10,000 clients over 1 minute on GET method through HTTPS variant of the target site. Also re-ran things a couple times to make sure there were no outlier results.
Results & Final thoughts
“What?! Results already? Where the charts?”
I’m not even going to waste your time or anymore of mine. The benchmark charts don’t show anything useful.
- OpenLiteSpeed and NGINX are just about equal in performance with caching on.
1st place was GridPane (NGINX with Redis object caching)
- averaged 67ms out of 10k requests
- trying it with FastCGI caching was a hair slower (interesting since they say their FCGI caching is faster than Redis)
2nd place was OpenLiteSpeed on CyberPanel (with LiteSpeed cache enabled)
- averaged 68ms out of 10k requests
- so like 1ms slower than GP. It’s unnoticeable!
3rd place was SpinupWP (NGINX with FastCGI caching)
- averaged 70ms
4th place was RunCloud (NGINX without FastCGI caching)
- failed and could not handle after about 35 requests
- EDIT: Apr 2020 – RunCloud now uses their RunCache (I assume it’s FastCGI) and can now hold its own with all the rest.
I also tried all of them without caching on and all of them failed. Sure you can try in the browser on your own time to see which one is faster without cache but I lost interest at this point. NGINX and OLS are close enough in performance that it shouldn’t be the deciding factor between which one you use. Use the one the one that’s cheaper for you, more compatible with your applications/panels, offers you more features or more webhosting convenience.
So what does this test mean? That NGINX is marginally faster than OLS? Sure. That could be true. Or it could be that the NGINX stack was better configured. I’ll always have a massive preference for LS & OLS because of their LiteSpeed caching plugin. Tons of features, super stable, and integrates at the server level. NGINX has yet to have one and that sets it apart for me. Then factor in LS crawler features, htaccess compatibility, and it pulls ahead even further. Yes, NGINX is free but so is OLS (free version of LS).
Ha…looks like it’s time for you to play with them on your own. By all means, run your own tests and see what you like best. Anybody claiming one is incredibly superior than the other is either biased or hasn’t tested them side-by-side.
Want to read more on LiteSpeed vs NGINX?
- Learn the history of web servers
Darkpollo
Did you try RunCloud with Redis?
Thanks
Johnny
I believe so, yes. RunCloud is fine. Just not the fastest. Great UI and developer environment. I’ve written many bits about RC.
Phil
Out of curiosity: did you ever test OpenLiteSpeed vs LSWS Enterprise?
Johnny
I have tested both side-by-side and their performance virtually the same for raw benchmarks. It’s that LSWS Enterprise can do more things which result in better performance, security and ease-of-use in a real-world environment.
Ivan
not sure why but i did a quick test deploying from cyberpanel openlitespeed and the default config is slow compared, with the one click installer of do. I get around 15ms with loader.io.
I will compare comfigurations this days.
Phil
Switched back from CyberPanel/OLS to Ploi/NGiNX for my Dev server, because while OLS was very speedy in the frontend, working in WP backend was noticeably slower on CyberPanel. All DB accesses were about half as fast on the CyberPanel setup compared to Ploi. Admittedly runcloud was even a bit faster, but I like small teams and also Ploi is from the Netherlands, so they certainly take GDPR very seriously.
All servers were the same level of Hetzner cloud instances.
Johnny
Thanks for this report, Phil. I have Ploi on my review list at some point. I wonder if the faster backend you’re sensing is because of Ploi enabling Redis on backend by default.
Phil
Redis is indeed running by default on a Ploi server, as is memcached. However, I didn’t change the WP setup to actually make use of Redis, so I don’t think it has much if any influence on perceived speed.
Because it’s a shared DEV server with lots of PHP changes, OPCache is turned off – that’s the one cache WP would use and profit from without having to setup any advanced-cache.php… at least that’s my feeble understanding of these things 🙂
Johnny
No worries. I’ll just have to try it later at some point. I do like that their interface is very much like RunCloud’s. Very clean and admin/dev friendly.
Dshan
Am I reading correctly? Runcloud could not handle 35 requests as compared to GridPanes 10k? Damn
Johnny
Yeaup, you read it correctly. Sure if I enable consumer-grade plugin, it will be able to but that’s a different comparison altogether. To be fair, I believe RunCloud will have some changes soon that I think will bring them right back up. I still love their panel a lot.
Haku Nguyen
“OpenLiteSpeed and NGINX are just about equal in performance with caching on.”
Thank you for your honest, I’ve confused between them two, but I’ll go with OLS 🙂
Johnny
Yes, try the free version. Then if you need certain specific features, you can upgrade then. I have LiteSpeed Enterprise and love it but that doesn’t mean everyone else needs it.
STN
Thanks Johnny for not writing a million words article written for Google and getting to the results that we want to see.
I heard about openlitespeed and going to try it. If its easier to manage than nginx, i am going to go with OLS then.
Johnny
“Thanks Johnny for not writing a million words article”….hahaha, yes! That’s exactly what I believe. I’m so sick of those silly long articles with no helpful information whatsoever.
Adrian
I was searching for such comparison, however I was also interested in Apache. I get ~120 ms for the same loader.io setup for my Apache.
Dung Dao
NGINX FastCGI Cache vs Litespeed cache | which the best bro?
Johnny
Read my entire site if you want the answer.
Dung Dao
Thanks
Hai
For me, nginx with w3tc plugin + memcache is faster than ols cache
Michiel
So have you tested Runcloud with their new caching setup and what are your experiences? I’ve been testing them out, but performance is for some strange reason massively behind (up to 400%) the other panels that use FastCGI (eg GridPane, Ploi, SpinupWP)
Johnny
I found the new RC caching to be much more comparable. 400% behind GP doesn’t sound right.
Michiel
Thanks for your fast reply Johnny! Looks like something is off indeed. I tried to sort it out with support, but still, something must be going wrong. I can easily get 1100 concurrent users on a $6 Vultr HF with GP, but on RC I don’t get past the 200-300 range. Also, the number of uncached concurrent users is lower (7 versus 11).
Time to do some retesting.
Sakthi
Runcloud have their own OpenLiteSpeed stack now, do you think it might make a performance difference then others in this comparison.
Johnny
I tried once and it didn’t go so smooth. I’ll have more to say once I finally try it again.
Mukesh Patel
Which is better —
1. NGINX Server + FastCGI Cache + Redis Object Cache + WP Rocket (Us it with WordOps panel)
2. OLS + LSCache(Redis Object Cache Enable) {Use it via CyberPanel
Please guide me, which one is better because I am confused because many says NGINX is faster and Litespeed shows wrong number, where some say OpenLiteSpeed is faster, too much confusing.
Mộng mơ
I used Litespeed and like it. I didn’t select others because my hosting provider offer Litespeed ^^