Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

Benchmark: Apache2 vs. Lighttpd (Static HTML Files)


This benchmark shows how Apache2 (version 2.2.3) and lighttpd (version 1.4.13) perform compared to each other when delivering a static HTML file (about 50KB in size). This benchmark was created with the help of ab (Apache benchmark) on a VMware vm (Debian Etch); if you try this yourself, your numbers might differ (depending on your hardware), but the tendency should be the same.

Preliminary Note

I have tested this on a Debian Etch system with 512MB RAM inside a VMware vm on a system with an Intel(R) Pentium(R) M processor 1400MHz (yes, quite old, but as I said in the introduction, the tendency should be the same on other hardware).

Apache 2.2.3 mpm-prefork with default Debian configuration.

Lighttpd 1.4.13 with default Debian configuration.

The HTML file I’ve used to test is a copy of the Kreationnext frontpage with a size of 49128 bytes. I’ve saved it as test.html.

I’ve run the following commands ten times each and calculated the average requests per second that the web server could handle:

ab -n 100 -c 5 http://localhost/test.html

ab -n 1000 -c 5 http://localhost/test.html

ab -n 10000 -c 5 http://localhost/test.html

ab -n 100 -c 50 http://localhost/test.html

ab -n 1000 -c 50 http://localhost/test.html

ab -n 10000 -c 50 http://localhost/test.html

ab -n 100 -c 100 http://localhost/test.html

ab -n 1000 -c 100 http://localhost/test.html

ab -n 10000 -c 100 http://localhost/test.html

-n is the number of requests to perform for the benchmarking session; -c is the number of multiple requests to perform at a time.

 

ab -n 100 -c 5 http://localhost/test.html

Apache: 437,58 requests/second

Lighttpd: 562,41 requests/second (+ 28,53%)

-n is the number of requests to perform for the benchmarking session; -c is the number of multiple requests to perform at a time.

1

ab -n 1000 -c 5 http://localhost/test.html

Apache: 627,60 requests/second

Lighttpd: 749,15 requests/second (+ 19,37%)

2

ab -n 10000 -c 5 http://localhost/test.html

Apache: 916,70 requests/second

Lighttpd: 1181,18 requests/second (+ 28,85%)

3

ab -n 100 -c 50 http://localhost/test.html

Apache: 469,47 requests/second

Lighttpd: 501,45 requests/second (+ 6,81%)

4

ab -n 1000 -c 50 http://localhost/test.html

Apache: 583,74 requests/second

Lighttpd: 708,13 requests/second (+ 21,31%)

5

ab -n 10000 -c 50 http://localhost/test.html

Apache: 827,41 requests/second

Lighttpd: 1058,69 requests/second (+ 27,95%)

7

ab -n 1000 -c 100 http://localhost/test.html

Apache: 547,59 requests/second

Lighttpd: 706,53 requests/second (+ 29,03%)

8

ab -n 10000 -c 100 http://localhost/test.html

Apache: 790,74 requests/second

Lighttpd: 924,52 requests/second (+ 16,92%)

9

Complete Graph

10

 

ab -n 100 -c 5 http://localhost/test.html

Apache: 437,58 requests/second

Lighttpd: 562,41 requests/second (+ 28,53%)

Comments

comments