I've just installed lighttpd and done some benchmark tests to compare it with apache. My test was to serve a css file, so server side logic going here, just plan text.
My first test was with keep-alives off
Apache
Code:
# ab -c 100 -n 1000 http://tdd.org.uk/css/style.css
...
Requests per second: 7391.09 [#/sec] (mean)
Lighttpd
Code:
# ab -c 100 -n 1000 http://tdd.org.uk:82/css/style.css
...
Requests per second: 7267.92 [#/sec] (mean)
So at first they are about the same, then I used keep-alives in my test.
Apache
Code:
# ab -c 100 -n 1000 -k http://tdd.org.uk/css/style.css
...
Requests per second: 12578.93 [#/sec] (mean)
Lighttpd
Code:
# ab -c 100 -n 1000 -k http://tdd.org.uk:82/css/style.css
...
Requests per second: 16324.93 [#/sec] (mean)
Once keep-alives are turned on, lighttpd performs much better than Apache giving better requests per second. I configured apache and lighttpd to have the same keep-alives settings, max number etc so to keep a fair test.
One thing to note is that each apache child process uses approximatly 95MB of memory, whereas each lighthttpd process uses about 3MB of memory.
There are probably things apache can do that lightttpd can't, but for pretty standard to mid-advanced stuff (yes you can still do rewrites, php etc) then lighttpd does seem to win.
These tests were all done on a L-
VPS Hosting-01
VPS Hosting.