I like how the troll missed his mark, but still got dinner for a week.
Try HAProxy for loadbalancing.
Way better than NGINX.
Faster, way more configurable, solid since 2002.
Yeah I mentioned that earlier in the thread too. Given the benchmark is from Litespeed themselves, I reckon theyāve got the worst Apache config, in order to bias the results
Having said thatā¦ As far as I know, the event
MPM still uses blocking I/O though, so in theory itās possible for Nginx and Litespeed (and others with non-blocking I/O, like Litespeed) to perform better under heavy load with lots of connections, or with connections from lots of people with slow internet connections.
Sure. My point was that showing a chart with some random results is completely meaningless without also showing the test setup.
If you really want to make your point, do the opposite.
Show us a test setup with exact results.
Decided to give it a try myself, so far Iām seeing about 8 times worse performance with OpenLiteSpeed.
My setup:
- OpenLiteSpeed setup: WordPress ā OpenLiteSpeed
- Nginx setup:
- Nginx 1.16.0 from official Nginx RPM, https://gist.githubusercontent.com/FHRNet/458001ecd9a4918fc369c2914a108e18/raw/37dd7cf760a525c6fccd57d348da20f6a6a27bd4/wordpress.conf
- PHP-FPM 7.2 from Remi repo, nothing changed in config files
Testing done on my SkylonHost 1GB RAM, 1 core, SSD, 500Mbps network VPS with CentOS 7.
OLS, Nginx and ApacheBench all used different VMs, testing was done over the network (on the same VM node). I was careful to not change any default values in anything (memory limits, caching options, ā¦).
Stock WordPress install, never even logged in to admin panel. Hitting the demo Hello World post. Obviously no caching.
Preliminary results, will do complete testing (along with impact of caching plugins) and a write-up tomorrow:
OpenLiteSpeed:
Document Path: /wordpress/index.php/2019/05/02/hello-world/
Document Length: 18642 bytes
Concurrency Level: 10
Time taken for tests: 510.793 seconds
Complete requests: 3000
Failed requests: 0
Write errors: 0
Total transferred: 57051023 bytes
HTML transferred: 55926000 bytes
Requests per second: 5.87 [#/sec] (mean)
Time per request: 1702.642 [ms] (mean)
Time per request: 170.264 [ms] (mean, across all concurrent requests)
Transfer rate: 109.07 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 2
Processing: 168 1701 139.2 1691 8005
Waiting: 152 1608 137.8 1599 7911
Total: 168 1701 139.2 1691 8005
Percentage of the requests served within a certain time (ms)
50% 1691
66% 1702
75% 1711
80% 1718
90% 1746
95% 1780
98% 1829
99% 1879
100% 8005 (longest request)
1m system load just before test end: 11.75
Nginx
Document Path: /2019/05/02/hello-world/
Document Length: 17850 bytes
Concurrency Level: 10
Time taken for tests: 66.236 seconds
Complete requests: 3000
Failed requests: 0
Write errors: 0
Total transferred: 54519000 bytes
HTML transferred: 53550000 bytes
Requests per second: 45.29 [#/sec] (mean)
Time per request: 220.786 [ms] (mean)
Time per request: 22.079 [ms] (mean, across all concurrent requests)
Transfer rate: 803.81 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 38 220 18.6 219 357
Waiting: 24 153 22.0 148 293
Total: 39 220 18.6 219 357
Percentage of the requests served within a certain time (ms)
50% 219
66% 222
75% 224
80% 226
90% 232
95% 239
98% 263
99% 323
100% 357 (longest request)
1m system load just before test end: 7.77
Niceā¦ looking forward to itā¦ thanks in advance
Check this test first before benchmarking (He didnāt test LS with LScache enabled) :
Soā¦ the bad OpenLiteSpeed results were caused by the fact that their own guide does NOT suggest installing PHP Opcache, which I didnāt notice at first. Once I installed it, results were a lot better.
I unfortunately didnāt test Apache httpd as I didnāt have time, but that might happen in the future.
I donāt like ApacheBench that much as itās not a complete testing suite - it tests basically only page generation without also testing static file serving capabilities, i.e. without downloading all the linked resources on the page. But itās simple and easy to use.
Results:
Seems like PHP-FPM was actually the bottleneck in my testing. OpenLiteSpeedās LSPHP scales much better out of the box. When we compare WP Super Cache results, Nginx does much better than OLS which suggests that Nginxā static serving capabilities are better.
I expected LSCacheās performance to be better. Yes, it does fairly well. But Nginx still beats it with Super Cache while also causing a lower system load.
An interesting variation might be testing Nginx with microcaching - that would be technically pretty similar to LSCache. Didnāt have enough time to do that unfortunately.
Thanks for testing !
Interesting resultsā¦ did you notify LS about the PHP Opcache issue?
I bet thereās still some tweaking and tinkering possible with LS settings
Yep, I let someone who works there know.
//EDIT: Guide has been fixed by now.
Should we summon Eva2000ļ¼
BuyVM, Ramnode, Hostmantis and many more providers use Litespeed for shared hosting.
Are they all wrong ?
Easier installation and htaccess compatibility makes LiteSpeed the unique replacement for shared environments.
LiteSpeed caters to shared hosting environments. Being a drop-in Apache replacement which integrates very well with cPanel, itās basically a nobrainer.
Nginx doesnāt really support shared environments.
Anyway, I went over my numbers with someone close to LiteSpeed. Seems the WordPress guide is totally garbage and a reason why I was getting ābadā numbers. Will retest with their suggestions and optimizations in the future.
whoops I donāt frequent this forum as much as I should but better late than never - cyberpanel openlitespeed vs centmin mod nginx wordpress benchmarks at https://community.centminmod.com/threads/wordpress-webpagetest-pagespeed-comparison-for-cyberpanel-1-7-rc-openlitespeed-vs-centmin-mod-lemp.15211/
FYI, Centmin Mod has plans to integrate Apache 2.4/Litespeed and Openlitespeed eventually so you can choose between them and Nginx - on project dev dashboard at 123.09beta01 Development Previews & Work Ā· GitHub
Iāve setup a Slice with OLS to use with WordPress.
LSCache module with WordPress LS Cache add-on + Redis is very fast.
The big advantage here is the WordPress plugin that has many features and replaces a handful of additional addons.
Besides cache, you have object cache integration with Redis/Memcache JavaScript, css and html optimization, lazyload, image optimization using Litespeed Image Optimization Servers, WebP, Cloudflare integration for cache invalidation, http/2 push and more!
Lsphp can also give a bump in the overall performance.
I havenāt made a full comparative with nginx but performance should be similar, slight advantage for nginx when serving static files, but lsphp is the winner here.
Seems this has changed (From KB):
As of v1.4.38, OpenLiteSpeed supports the ability to load .htaccess from directories and subdirectories automatically. The old ways of adding rewrite rules manually via the WebAdmin Console or vHost config will continue to work, but if youāre looking to manage your rewrite rules from .htaccess directly, we now have a solution for it, and it is the recommended way for rewrite rules going forward.
Thanks for this update. Iām so tied into mod_rewrite that I just canāt even conceive of something else for my no-profit no-fun projects- until now.
Finally we can say, yes, OpenLiteSpeed IS a good Apache replacement.