What’s your experience with Open Litespeed/Litespeed vs Nginx lately?
I’ve just made some load tests comparing both of them and the results are unexpected.
1st test 250 clients per sec: OpenLitespeed did pretty good with only 261ms average response time.
Nginx 343ms average response time.
2nd test 500 clients per sec: OpenLitespeed fall hard with 4992ms avg response time and 42% errors.
Nginx was very stable with 367ms avg respone time and zero error.
3rd test 1000 clients per sec: OpenLitespeed couldn’t finish the test and crashed. I have to restart it few time but the result was the same. Switched to Enterprise version and 4529ms avg response time with 42% errors.
Nginx still did good with 2046ms avg response time with only 2% errors.
I used to believe that there is no way nginx can beat OpenLitespeed/Litespeed in load test.
Or did I miss something? Do you guys have any suggestion for me?
The reason why I choose Cyberpanel and Gridpane? Because they are easy to install for normal user like me.
Updated: Just upgrade VPS to 2vCPU 4GB Ram, running Litespeed Enterprise with LS Cache enabled. Results:
2nd test with 500 clients per sec: 1366 ms avg resp 10.5% err rate
3rd test with 1000 clients per sec: 4610 ms avg resp 43.6% err rate.
A 20$ VPS running Cyberpanel with Litespeed Enterprise still can’t beat 5$ Nginx VPS with Gridpane. Is it true or there is something wrong with Cyberpanel?
It was due to Max connections settings, this commit should fix this -> https://github.com/usmannasir/cyberpanel/commit/769155a0e6243f47875d823337c60942e94e1ae8
But I have set Max Connections to 20000 and Max SSL Connections to 10000 in OpenLitespeed Tunning in Cyberpanel Admin.
ran 1000 clients on litespeed ent average response 207ms, no errors with 4198/s request. Keep in mind my homepage is utilising lscache.
You need to find PHP suEXEC Max Conn and change that too on litespeed panel, found out i had to match that with the number of connections to be able test. Link to the source is here litespeed_wiki:php:process-mode [LiteSpeed Wiki]
It’s turn out that default Cyberpanel settings for OpenLitespeed “Max Connections” is too high (100000) and “Smart Keep Alive” is ON which are not so good for low specs 5$ VPS.
On my 5$ Vultr VPS, just need to change those settings like this:
Max Connections 2000
Max SSL Connections 2000
Keep Alive Timeout 3
Smart Keep Alive Timeout: OFF (In OpenLitespeed webadmin console)
And then my box can handle 1000 clients per sec test without problem. It even outperform GP Nginx in avg response time.
I’d like to thanks Johnny Nguyen (wpjohnny.com) and Litespeedtech Tech support for helping me in this case.
P/S: Default Cyberpanel settings for OpenLitespeed “Max Connections” was only 10000 just before my thread was created. I don’t know why it changes to so high value recently.
@Misao cyberpanel changed it after you did the test in one of the recent commits, it was already working if you had tested it, but yes changing it to the values suggested by the johnny and litespeed support is good.
@Misao ,
Since 1.6.4 is not on stable tier yet, you can try /usr/local/lsws/admin/misc/testbeta.sh 1.6.4 to manually upgrade openlitespeed from ssh console.