I understand that lighthttps is single threaded, whereas nginx is 
multithreaded. So if you have multiple CPU cores, then nginx would be 
faster but also using twice the CPU resources.

On Monday, January 7, 2008 at 3:55:41 PM UTC, David Cancel wrote:
>
> I know.. I know... Simple benchmarks mean nothing but I couldn't help 
> playing with the new(ish) mod_wsgi module for my favorite webserver 
> Nginx. 
>
> Nginx: http://nginx.net/ 
> Nginx mod_wsgi module: http://wiki.codemongers.com/NginxNgxWSGIModule 
>
> I tested Nginx vs. the recommended setup of Lighttpd/Fastcgi. These 
> very simple and flawed tests were run on Debian Etch running under 
> virtualization (Parallels) on my Macbook Pro. Hey I said they were 
> flawed.. :-) 
>
> The results show Nginx/WSGI performing 3x as fast as Lighttpd/Fastcgi, 
> over 1000 requests per second!! 
>
> I tested both with Keep-Alives on and off. I'm not sure why Nginx/WSGI 
> performed 2x as fast with keep-alives on. 
>
> *********** Full results below ************* 
>
> -------------------------------------------- 
> Nginx 0.5.34 - Keepalives On 
> --------------------------------------------- 
> ab -c 10 -n 1000 -k http://10.211.55.4/wsgi-webpy/david 
> This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 
>
> Server Software:        nginx/ 
> 0.5.34 
> Server Hostname:        10.211.55.4 
> Server Port:            80 
>
> Document Path:          /wsgi-webpy/david 
> Document Length:        14 bytes 
>
> Concurrency Level:      10 
> Time taken for tests:   0.970 seconds 
> Complete requests:      1000 
> Failed requests:        0 
> Broken pipe errors:     0 
> Keep-Alive requests:    1001 
> Total transferred:      136136 bytes 
> HTML transferred:       14014 bytes 
> ** Requests per second:    1030.93 [#/sec] (mean) ** 
> Time per request:       9.70 [ms] (mean) 
> Time per request:       0.97 [ms] (mean, across all concurrent 
> requests) 
> Transfer rate:          140.35 [Kbytes/sec] received 
>
> Connnection Times (ms) 
>               min  mean[+/-sd] median   max 
> Connect:        0     0    0.4      0     5 
> Processing:     1     9    4.3      9    26 
> Waiting:        0     9    4.2      9    25 
> Total:          1     9    4.3      9    26 
>
> Percentage of the requests served within a certain time (ms) 
>   50%      9 
>   66%     11 
>   75%     12 
>   80%     13 
>   90%     15 
>   95%     17 
>   98%     20 
>   99%     22 
>  100%     26 (last request) 
>
> -------------------------------------------- 
> Nginx 0.5.34 - No Keepalives 
> --------------------------------------------- 
> ab -c 10 -n 1000  http://10.211.55.4/wsgi-webpy/david 
> This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 
>
> Server Software:        nginx/ 
> 0.5.34 
> Server Hostname:        10.211.55.4 
> Server Port:            80 
>
> Document Path:          /wsgi-webpy/david 
> Document Length:        14 bytes 
>
> Concurrency Level:      10 
> Time taken for tests:   2.378 seconds 
> Complete requests:      1000 
> Failed requests:        0 
> Broken pipe errors:     0 
> Total transferred:      131131 bytes 
> HTML transferred:       14014 bytes 
> ** Requests per second:    420.52 [#/sec] (mean) ** 
> Time per request:       23.78 [ms] (mean) 
> Time per request:       2.38 [ms] (mean, across all concurrent 
> requests) 
> Transfer rate:          55.14 [Kbytes/sec] received 
>
> Connnection Times (ms) 
>               min  mean[+/-sd] median   max 
> Connect:        0     4    2.9      3    26 
> Processing:     8    19    8.8     18   136 
> Waiting:        0    19    8.8     17   135 
> Total:          8    23    8.9     21   142 
>
> Percentage of the requests served within a certain time (ms) 
>   50%     21 
>   66%     24 
>   75%     26 
>   80%     28 
>   90%     34 
>   95%     40 
>   98%     45 
>   99%     47 
>  100%    142 (last request) 
>
> ********************************************************************* 
>
> -------------------------------------------- 
> Lighttpd 1.4.13 - Keepalives On 
> --------------------------------------------- 
> ab -c 10 -n 1000 -k http://10.211.55.4/david 
> This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 
>
> Server Software:        lighttpd/ 
> 1.4.13 
> Server Hostname:        10.211.55.4 
> Server Port:            80 
>
> Document Path:          /david 
> Document Length:        14 bytes 
>
> Concurrency Level:      10 
> Time taken for tests:   2.901 seconds 
> Complete requests:      1000 
> Failed requests:        1 
>    (Connect: 0, Length: 1, Exceptions: 0) 
> Broken pipe errors:     0 
> Keep-Alive requests:    942 
> Total transferred:      138711 bytes 
> HTML transferred:       14001 bytes 
> ** Requests per second:    344.71 [#/sec] (mean) ** 
> Time per request:       29.01 [ms] (mean) 
> Time per request:       2.90 [ms] (mean, across all concurrent 
> requests) 
> Transfer rate:          47.81 [Kbytes/sec] received 
>
> Connnection Times (ms) 
>               min  mean[+/-sd] median   max 
> Connect:        0     0    1.1      0    21 
> Processing:     3    28   29.3     22   385 
> Waiting:        3    28   29.3     22   385 
> Total:          3    28   29.3     22   385 
>
> Percentage of the requests served within a certain time (ms) 
>   50%     22 
>   66%     26 
>   75%     31 
>   80%     34 
>   90%     48 
>   95%     60 
>   98%    100 
>   99%    164 
>  100%    385 (last request) 
>
> -------------------------------------------- 
> Lighttpd 1.4.13 - No Keepalives 
> --------------------------------------------- 
> ab -c 10 -n 1000 http://10.211.55.4/david 
> This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3 
>
> Server Software:        lighttpd/ 
> 1.4.13 
> Server Hostname:        10.211.55.4 
> Server Port:            80 
>
> Document Path:          /david 
> Document Length:        14 bytes 
>
> Concurrency Level:      10 
> Time taken for tests:   4.017 seconds 
> Complete requests:      1000 
> Failed requests:        1 
>    (Connect: 0, Length: 1, Exceptions: 0) 
> Broken pipe errors:     0 
> Total transferred:      134269 bytes 
> HTML transferred:       14029 bytes 
> ** Requests per second:    248.94 [#/sec] (mean) ** 
> Time per request:       40.17 [ms] (mean) 
> Time per request:       4.02 [ms] (mean, across all concurrent 
> requests) 
> Transfer rate:          33.43 [Kbytes/sec] received 
>
> Connnection Times (ms) 
>               min  mean[+/-sd] median   max 
> Connect:        0     3    4.9      2    68 
> Processing:     3    36   49.6     28   852 
> Waiting:        2    35   49.6     28   852 
> Total:          3    39   50.1     30   855 
>
> Percentage of the requests served within a certain time (ms) 
>   50%     30 
>   66%     36 
>   75%     41 
>   80%     44 
>   90%     61 
>   95%     87 
>   98%    148 
>   99%    252 
>  100%    855 (last request)

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to