Tuesday August 19, 2008 Today, after releasing Cherokee 0.8.1 I decided it was time to test again how it was doing about performance. In the last months we have got a great new I/O cache layer and a couple of structural changes that were supposed to have a positive impact on the general server performance, although nobody checked whether those changes were as effective as we aimed them to be.
So, once again, here I am bringing good news. We have done it. Cherokee is actually the fastest web server among a set of the most common servers nowadays: Apache, Cherokee, Lighttpd and Nginx!!

The benchmark consisted on half a million requests of a 1.7KiB static file, with 20 concurrent clients, using a 1Gbit/s local network. The results (fastest to slowest) were:
Server Software: Cherokee/0.8.1 Server Hostname: 10.0.0.102 Server Port: 80 Document Path: /index.html Document Length: 1795 bytes Concurrency Level: 20 Time taken for tests: 17.819725 seconds Complete requests: 500000 Failed requests: 0 Write errors: 0 Keep-Alive requests: 500000 Total transferred: 999007442 bytes HTML transferred: 897506630 bytes Requests per second: 28058.79 [#/sec] (mean) Time per request: 0.713 [ms] (mean) Time per request: 0.036 [ms] (mean, across all concurrent requests) Transfer rate: 54747.93 [Kbytes/sec] received
Lighttpd:
Server Software: lighttpd/1.4.19 Server Hostname: 10.0.0.102 Server Port: 80 Document Path: /index.html Document Length: 1795 bytes Concurrency Level: 20 Time taken for tests: 21.248000 seconds Complete requests: 500000 Failed requests: 0 Write errors: 0 Keep-Alive requests: 470598 Total transferred: 991856958 bytes HTML transferred: 897503590 bytes Requests per second: 23531.63 [#/sec] (mean) Time per request: 0.850 [ms] (mean) Time per request: 0.042 [ms] (mean, across all concurrent requests) Transfer rate: 45585.94 [Kbytes/sec] received
NginX:
Server Software: nginx/0.5.33 Server Hostname: 10.0.0.102 Server Port: 80 Document Path: /index.html Document Length: 1795 bytes Concurrency Level: 20 Time taken for tests: 23.741872 seconds Complete requests: 500000 Failed requests: 0 Write errors: 0 Keep-Alive requests: 500000 Total transferred: 1006000217 bytes HTML transferred: 897500000 bytes Requests per second: 21059.84 [#/sec] (mean) Time per request: 0.950 [ms] (mean) Time per request: 0.047 [ms] (mean, across all concurrent requests) Transfer rate: 41379.30 [Kbytes/sec] received
Apache2.2:
Server Software: Apache/2.2.8 Server Hostname: 10.0.0.102 Server Port: 80 Document Path: /index.html Document Length: 1795 bytes Concurrency Level: 20 Time taken for tests: 35.438605 seconds Complete requests: 500000 Failed requests: 0 Write errors: 0 Keep-Alive requests: 495064 Total transferred: 1043777896 bytes HTML transferred: 897500000 bytes Requests per second: 14108.91 [#/sec] (mean) Time per request: 1.418 [ms] (mean) Time per request: 0.071 [ms] (mean, across all concurrent requests) Transfer rate: 28762.81 [Kbytes/sec] received
For the record: I did my best configuring all the servers in the very same way. In all the cases I removed unnecessary rules that could have slowed down the server (checks for htpasswd files and so on). And all the binaries came from the Debian repository, except for Cherokee 0.8.1 that hasn't been packaged yet.
Anyway, this benchmark has been just a quick test. It is not certainly representing the result that these servers would have handling real traffic though. So, in the following days I will try to do a new a more accurate benchmark with static and dynamic content, compression, redirections, etc. I'm pretty sure the results will be even better.