19 Aug 2008
30652
hits

Cherokee 0.8.1 benchmark

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:

Cherokee:

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.

Comments

daeltar on Tue Aug 19 21:57:19 2008
868


What about more recent versions of nginx and lighttpd?
derek gottfrid on Tue Aug 19 22:27:02 2008
869


what did you use to test? ab , httperf ? always interested to find a good test client.
Taher on Tue Aug 19 23:24:34 2008
870


That's ab for sure. I thought that Lighty 1.4.19 was the latest stable release. I don't follow NginX so I'm not sure about the release. I must admit I've heard nice things about it, though. Anyway, I'd love to see the benchmarks with dynamic content. Especially how they cope with extremely high loads and PHP's inherent bugs. This certainly seems to be getting interesting :)
Frank Daley on Wed Aug 20 00:12:21 2008
871


Are there any plans to have Cherokee included in the Fedora repositories?
dagi3d on Wed Aug 20 03:19:00 2008
872


can cherokee run ruby on rails applications(maybe through fastcgi or working as proxy server for mongrel instances) ? it could probably be an alternative for nginx...
Alvaro Lopez Ortega on Wed Aug 20 09:05:38 2008
873


dagi3d: Of course it does (check out the documentation, there are even cookbooks covering those topics). Besides, a few months ago someone published a few benchmarks where Cherokee was faster and more stable than nginx serving FastCGI and SCGI content. :)
Hongli Lai on Wed Aug 20 12:36:14 2008
874


Very interesting, Cherokee beats lighttpd and nginx by a significant margin. As a fellow developer who's interested in performance, I'd really like to know how you managed to make Cherokee so fast. Would you consider blogging about the optimization techniques that you've used?
ak on Wed Aug 20 22:40:45 2008
875


Without a detailed descripton of each of the webservers' setup the results are pretty worthless. Also, you haven't checked out gatling, which is in my experience the webserver that scales best when delivering static files.
Justin on Thu Aug 21 02:58:54 2008
876


Can you re-run the tests with -n 100, -n 200 etc?
Ricardo Martins on Thu Aug 21 18:42:57 2008
877


What about memory usage?
Ricardo Martins on Thu Aug 21 18:43:48 2008
878


What about memory usage?
Stefan de Konink on Fri Aug 22 17:01:09 2008
879


@ak I agree it would be the best thing to make a platform for testing where everything is know. I want to implement such thing for a very long time now; so I'll try to free up some time for it.
web design company on Mon Aug 25 03:34:20 2008
880


No. Unless you pack into a space shuttle and shoot it into orbit.
alex paul on Wed Aug 27 23:08:58 2008
885


Hi, I read another benchmark with an older version of cherokee. How does the 0.8 perform with file more than 20 KB?? Perhaps 50 KB
Richard BEN ALEYA on Wed Nov 26 10:12:28 2008
1025


Hi, It would be interesting to add Yaws to your next benchmark. Richard
KonstantinMiller on Tue Jul 7 02:52:14 2009
1186


Hello, can you please post some more information on this topic? I would like to read more.
johnnylawisit on Tue Jan 12 07:45:00 2010
1280


So I think that there is good information here. Thanks for the contribution!
blancobb on Tue Jan 12 23:17:21 2010
1281


This is very interesting information here. I wish I had found this first before I signed up for the other one. This is much better
jimmywilliamson on Thu Jan 14 01:28:07 2010
1283


No offense to anyone on here, but it is funny how new users like myself trust everything that they read hear. Just because youve been a member longer than me does not mean that you are smarter. Please heed all advice before taking :)

Leave a comment

Name:

Comment:


Loading PhotoLog..


Search

 

Twitter


Facebook

Alvaro Lopez Ortega's Profile
Alvaro Lopez Ortega's Facebook Profile