John Fremlin's blog: teepeedee2 vs nginx's perl module

Posted 2009-10-28 12:06:00 GMT

My friend Zev noticed that there was a discussion of teepeedee2 on the nginx mailing list. Discussion focused on the teepeedee2 benchmark game.

The benchmark is to see how quickly a simple dynamic page can be returned to the client, with keepalives and pipelining disabled. It may or may not be relevant to the real world performance of your website in practice (probably not if you use a database); it is a microbenchmark giving an upper bound to the rate your system can serve dynamic pages.

Igor Sysoev (the author of nginx) notes that, This means that this microbenchmark tests mostly TCP connection establishment via localhost. This is correct, but it illustrates one of the misconceptions of the benchmark game; it is what should happen in the ideal world. In fact, In the case of systems like PHP behind Lighttpd (3.1k/s) or Mongrel with Ruby (only 1.8k/s), this adamantly is untrue. In that case the time is dominated by doing other (less necessary) things. If the time is mostly spent in the kernel, then you are probably doing it right(tm).

This benchmark is not going to give a complete picture of your web platform. It is an experimental measure of one aspect of its efficiency. It is valuable because it provides an upper bound to the maximum client rate that your platform can handle on one core, which you can use to provide a perspective on the efficiency of your actual website.

Igor posted this code for the embedded perl module on nginx, to play the teepeedee2 benchmark game.

 server {
        listen 8010;
        access_log  off;
        location = /test {
            perl 'sub {
               my $r = shift;
               $r->print("<h1>Hello ", $r->variable("arg_name"), "</h1>");
               return OK;

To be clear, the teepeedee2 benchmark game does not use keep-alives and I used the following apachebench command as usual

schedtool -a 0 -e ab -n 100000 -c1 localhost:8010/test?name=John
and with nginx 0.8.15 (which I built from the tarball) got
Requests per second:    7666.89 [#/sec] (mean)
Time per request:       0.130 [ms] (mean)
Time per request:       0.130 [ms] (mean, across all concurrent requests)
Transfer rate:          1055.70 [Kbytes/sec] received
on my old laptop.

I think therefore that nginx can take the title of fastest mainstream webserver for dynamic content. Only a 30%-40% speedup needed to compete with teepeedee2!

amazing results.....and lisp powered for max lisp webserver can outperform apache and the epoll server...what about vs aolserver?

Posted 2009-10-30 04:30:21 GMT by claymore_at_eml_cc


each time I refrsh the page the counter at the top right (underneath the date) get increased by one.

Right now: "9 watching live"

Posted 2014-02-05 15:37:39 GMT by Priyadarshan

Post a comment