OpenCart with OpenLiteSpeed and LSCache vs. OpenCart with NGINX
We ran OpenCart on OpenLiteSpeed with our new LiteSpeed Cache for OpenCart Extension, and compared it to OpenCart on NGINX. Given the lack of free OpenCart cache extensions, we were unable to test a cache solution with NGINX. If you are currently using OpenCart with NGINX and you have a cache extension installed, we encourage you to compare. We’d love to see your results!
All tests were performed with Keep-Alive enabled. (See more common settings under Web Server Configuration below.)
The following charts show how many requests per second the two servers processed during our series of tests. The larger the number, the better.
As you can see, OpenLiteSpeed with LSCache outperforms uncached NGINX by a significant amount.
This is the command we used in all tests:
ab -n 10000 -k -H "Accept-Encoding: gzip,deflate" -c 10 example.com/path
Each test was run five times, and the average result was used for our graphs.
Common Settings For Web Servers
- PHP use socket
- PHP version 7.1.17
Additional OpenLiteSpeed Settings
- Number of Workers = 4
- PHP_LSAPI_CHILDREN = 20
- LSAPI_AVOID_FORK = 1
Additional Nginx Settings
- worker_processes = 4
- worker_connections = 4096
- pm.start_servers = 20
Web Server Version
- OpenLiteSpeed: v1.4.28
- NGiNX: v1.12.2
Server API Version
- OpenLiteSpeed: LSAPI v7.1
- NGiNX: FPM/FastCGI
- OpenLiteSpeed: LSCache for OpenCart 1.0
- NGiNX: None
- OpenCart version: 220.127.116.11
Server Hardware Specs
- Intel Xeon CPU E7- 4870 4 Core @ 2.40GHz
- 4GB RAM
- 120GB ZFS RAID-Z2 iSCSI Drive
- CentOS 7
Although we didn’t use one for our benchmarks, We recommend Solid State Drives (SSD) in production environments.