Topic: lighttpd vs apache
I started to hear about lighttpd recently, mostly from the rubyonrails people who suggest it for production webservers running rails. Some of the talk is here, here and here, but you can google for more.
I had a quick look at the lighttpd site, and they have a quite impressive benchmark page. I noticed, however, that they used apache 1.x on the tests, so I wondered how apache 2 would perform, especially when using the "worker" MPM model (i.e., threads instead of forking processes).
So I decided to do a small benchmark myself. I installed both servers and the "flood" program from the apache foundation. I set up a pretty basic config file for flood, telling it to do GET and HEAD requests on an HTML page with server-side includes for 60 seconds. Both webservers were configured with support for SSI (obviously) and compression enabled.
Here are my results:
Average times (sec) connect write read close hits URL 0.0004 0.0005 0.0069 0.0069 37639 http://10.7.1.229/ Requests: 37639 Time: 52.24 Req/Sec: 676.28
Average times (sec) connect write read close hits URL 0.0011 0.0022 0.0026 0.0033 59825 http://10.7.1.229/ Requests: 59825 Time: 39.58 Req/Sec: 1512.86
So lighttpd handled almost 1,6 more requests than apache, and more than twice the requests/second rate.
The machine is a Celeron 2.4Ghz with 256MB of RAM.
Does anyone have real-world experience with lighttpd? I'd be interested in doing more complex benchmarks, and testing other configuration options on the webservers (for example, benchmarking dynamic content).