Well, be warned that this comparison is highly unscientific and makes no claims about the overall performance of the mentioned webservers. Anyway, I played with JMeter a little bit this evening, and defined the following test scenario: 5 parallel threads make 500 requests each, each of these requests downloads a small file of 35 bytes. I compared cwapd, the webserver that I based on my HTTP stack, swebd, which
nion wrote for an exercise at university, Apache 2.0.55, gatling (the webserver which Fefe used to do his
scalability benchmarks) and thttpd. All I was interested in was the through-put, i.e. how many requests per second each server was able to handle. And here are the results:
- cwapd: 93.6 req/s (with a 30.3 % error rate due to some problems with the multithreading, I suppose; the only test candidate with an error rate > 0.0 % at all)
- swebd: 188.2 req/s (not bad for a forking webserver)
- Apache: 412.3 req/s
- thttpd: 448.8 req/s
- gatling: 973.5 req/s (!!! and the best thing: running gatling with whatever load on it never increased the total system load by more than 1!)
I knew that gatling would be a good performer, but I never expected it to be so much better than the others. And in case you don't believe me:
download the test plan. The machine on which I did the tests was a 400 MHz AMD K6-2 with 384 MB RAM (not really great, I know, but it works), and JMeter was running on my brand-new MacBook Pro, and never had any significant impact on the Mac's system load.