Is OpenLiteSpeed a good Apache Replacement?

I like how the troll missed his mark, but still got dinner for a week.

1 Like

Try HAProxy for loadbalancing.

Way better than NGINX.

Faster, way more configurable, solid since 2002.

1 Like

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 :slight_smile:

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.

1 Like

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.

benchmark with test setup :

Decided to give it a try myself, so far Iā€™m seeing about 8 times worse performance with OpenLiteSpeed.

My setup:

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

5 Likes

Niceā€¦ looking forward to itā€¦ thanks in advance

Check this test first before benchmarking (He didnā€™t test LS with LScache enabled) :

1 Like

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.

4 Likes

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 ?

1 Like

Easier installation and htaccess compatibility makes LiteSpeed the unique replacement for shared environments.

1 Like

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.

4 Likes

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

3 Likes

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.

1 Like

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.

5 Likes

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.

1 Like

Finally we can say, yes, OpenLiteSpeed IS a good Apache replacement.

1 Like