Compare Caching Solutions LiteSpeed LSCache vs. Varnish https://download.litespeedtech.com/images/logos/litespeed/litespeed-logo.png 2019-10-01 14:53:46 We compared the speed at which Varnish and LSCache deliver cached content. We ran tests with small dynamic and static files, and tested with and without keep-alive.

Varnish Comparison Benchmark

Caching with LiteSpeed vs. caching with Varnish

We compared the speed at which Varnish and LSCache deliver cached content. We ran tests with small dynamic and static files, and tested with and without keep-alive.

Serving Dynamic Content - hello.php

Serving Static Content - hello.html

LSCache typically outperforms Varnish by a factor of 2.

Summary

  • LSCache Performance Gain (Dynamic Content)

    Concurrent Users Keep-Alive Apache / Varnish
    10 No 2.3x
    Yes 2.1x
    100 No 1.8x
    Yes 1.6x
  • LSCache Performance Gain (Static Content)

    Concurrent Users Keep-Alive Apache / Varnish
    10 No 2.6x
    Yes 3.0x
    100 No 1.8x
    Yes 2.2x

Notes:

  • Both static and dynamic files were 4.0K in size. We used such a small files to avoid saturating the network connection.
  • The test was performed over a 10GBps network connection to make sure network bandwidth did not become a bottleneck.
  • The benchmark simulated serving 10000 requests to 10 and 100 users.

Test Environment

Software:

LiteSpeed Enterprise 5.1.13
Apache 2.4.25
PHP 7.1.2
Varnish 4.1.5
cPanel 62

Server hardware specs:

Intel Xeon X5660 Single Core @ 2.80GHz
2GB RAM
50GB HDD
CloudLinux 7.3

Client hardware specs:

Intel Xeon E5-1620 Dual Core @ 3.60GHz
2GB RAM CentOS 6.8 with OpenVZ kernel 2.6.32-042stab116.1
Intel X540 10GBASE-T on board NIC

Network Switch:

Netgear XS708E-100NES 8-ports 10G switch

We welcome your feedback on our forum.