PHP Hello World Performance Benchmark https://litespeedtech.com/images/logos/litespeed/litespeed-logo.png 2019-11-20 19:11:54 Which responds to a PHP request faster via HTTP/2: LiteSpeed Web Server, nginx or Apache? We ran a series of PHP HTTP/2 benchmarks, to compare LSWS, nginx, and Apache. LiteSpeed PHP responded with Hello World 1.3X faster than nginx and 4.5X faster than Apache!

PHP Responds 1.3X Faster with LiteSpeed!

LiteSpeed's response time for PHP requests via an HTTP/2 connection beats both nginx and Apache.

This benchmark compares the speed at which different web servers respond to requests for small PHP scripts. We used a tiny script to avoid saturating the network connection and to show raw speed differences between the different setups. In our testing, LiteSpeed outperformed nginx and Apache by as much as 1.3X and 4.5X, respectively.

You can run these same tests. We followed the methodology laid out on http2benchmark.org.


Summary

HTTP/2 Test Results

h2load -n 100000 -c 10 -t 1 -T 5 -m 10 -H 'Accept-Encoding: gzip,deflate' https://domain.com/hello.php
Server Requests / Sec MB / Sec Failures Header Compression
LiteSpeed 13571.9 0.88 0 96.19%
Nginx 10570.9 1.77 0 29.61%
Apache 3049.1 0.18 0 94.2%

Please note: we usually run the h2load test with -c 100, but in this case there were too many errors occurring with nginx and Apache. We reduced -c to 10 for this reason.

LiteSpeed Web Server responds to PHP requests 1.3X faster than Nginx and 4.5X faster than Apache.

HTTP 1.1 Test Results

wrk -c 100 -t 1 -d 5s -H 'Accept-Encoding: gzip,deflate' https://domain.com/hello.php
Server Requests / Sec MB / Sec Failures Header Compression
LiteSpeed 12555.4 3.16 N/A N/A
Nginx 10398.7 3.08 N/A N/A
Apache 2953.98 0.79 N/A N/A

LiteSpeed Web Server responds to PHP requests 1.2X faster than Nginx and 4.3X faster than Apache.


Test Environment

  • Server Tested:

    • LiteSpeed Web Server v5.4.1
    • nginx v1.16.1
    • Apache v2.4.41
  • Client Machine:

    • Memory Size: 1GB
    • CPU number: 1
    • CPU Threads: 1
    • CPU Model: Virtual CPU 6db7dc0e7704
    • Disk: NVMe SSD
  • Server Machine:

    • Memory Size: 1GB
    • CPU number: 1
    • CPU Threads: 1
    • CPU Model: Virtual CPU 6db7dc0e7704
    • Disk: NVMe SSD
  • Network:

    • Traffic: 7.82 Gbits/sec
    • Latency: 0.374 ms

accelerate internet
[

Accelerate Your Internet Now!

]

We welcome your feedback on our forum.