Benchmark: Apache2 vs. Lighttpd (Static HTML Files)

Channel: Linux
Abstract: -c is the number of multiple requests to perform at a time. ab -n 100 -c 5 http//localhost/test.html ab -n 10000 -c 100 http
Benchmark: Apache2 vs. Lighttpd (Static HTML Files)

Version 1.0
Author: Falko Timme

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 HowtoForge 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%)

 

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

Apache: 627,60 requests/second

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

 

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

Apache: 916,70 requests/second

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

Ref From: howtoforge
Channels: lighttpdapache

Related articles