Re: Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

2004-07-25 Thread Brian Pane
Henri Gomez wrote:
I made some benchs on my Linux Fedora Core 2
on a P4 2.8ghz / 1Gb RAM :

Apache 2 alone 1202 req/s
TC/Coyote 883 req/s

One thing I noticed when looking at Tomcat 5.0.x is that its default,
static-file-delivering servlet does a stat(2) of each path prefix leading
up to the file.  A standard installation of Apache 2.x, with FollowSymlinks
enabled, doesn't do these stat calls, for obvious performance reasons.
Is the stat'ing of all the directories leading up to the requested file
in Tomcat intentional (it *is* valuable in some environments for
security purposes), or is it just a side-effect of the implementation?
Brian


Some benchs results : WAS: Invitation to HTTPD commiters in tomcat-dev

2004-07-22 Thread Henri Gomez
I made some benchs on my Linux Fedora Core 2
on a P4 2.8ghz / 1Gb RAM :
Apache 2.0.50 in
 - Apache 2.0.50 alone (simple html file)
 - TC 3.3.2/Coyote 1.1
 - Apache 2.0.50 + jk 1.2.6 + TC 3.3.2/jk2
JkMount /examples/* local
worker.local.port=8009
worker.local.host=localhost
worker.local.type=ajp13
worker.local.cachesize=16
worker.local.cache_timeout=600
worker.local.socket_keepalive=1
worker.local.socket_timeout=300
 - Apache 2.0.50 + mod_proxy + TC 3.3.2 (Coyote 1.1).
ProxyPass /tc3/ http://localhost:11011/
ProxyPassReverse /tc3/ http://localhost:11011/
Apache Bench is running on another machine, Windows 2000 P3 1Ghz,
and both systems are on a switched 100Mbps network :
Apache 2 alone  1202 req/s
TC/Coyote   883 req/s
Apache 2 + jk + TC  906 req/s
Apache 2 + proxy + TC   497.req/s   (but with 8000 errors ;(
Constatation :
- Remy make a tremendous works since Coyote HTTP 1.1 is only 15% slower
  than the Apache 2 native HTTP.
- mod_proxy is 50% slower than mod_jk and that's a really bad news.
  Also many errors appears, about 4% errors.
- Tomcat via jk or mod_proxy, when on the same machine make a cpu load
  of 60% system and 30% user. Tomcat alone is 33% system and 10% user.
How could we optimize mod_proxy settings since I'm using the standard
httpd.conf ?
--
Complete bench results :
Apache 2.0.50 alone (simple html file)
C:\Program Files\Apache Group\Apache2\bin>ab -k -n 20 -c 16 
http://machone/HelloWorldExample.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 2 requests
Completed 4 requests
Completed 6 requests
Completed 8 requests
Completed 10 requests
Completed 12 requests
Completed 14 requests
Completed 16 requests
Completed 18 requests
Finished 20 requests
Server Software:Apache/2.0.50
Server Hostname:machone
Server Port:80
Document Path:  /HelloWorldExample.html
Document Length:459 bytes
Concurrency Level:  16
Time taken for tests:   166.299127 seconds
Complete requests:  20
Failed requests:0
Write errors:   0
Keep-Alive requests:0
Total transferred:  14580 bytes
HTML transferred:   9180 bytes
Requests per second:1202.65 [#/sec] (mean)
Time per request:   13.304 [ms] (mean)
Time per request:   0.831 [ms] (mean, across all concurrent requests)
Transfer rate:  856.18 [Kbytes/sec] received
Tomcat 3.3.2 using the Coyote 1.1 HTTP connector
C:\Program Files\Apache Group\Apache2\bin>ab -k -n 20 -c 16 
http://machone:11011/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 2 requests
Completed 4 requests
Completed 6 requests
Completed 8 requests
Completed 10 requests
Completed 12 requests
Completed 14 requests
Completed 16 requests
Completed 18 requests
Finished 20 requests
Server Software:Apache-Coyote/1.1
Server Hostname:machone
Server Port:11011
Document Path:  /examples/servlet/HelloWorldExample
Document Length:400 bytes
Concurrency Level:  16
Time taken for tests:   226.485671 seconds
Complete requests:  20
Failed requests:0
Write errors:   0
Keep-Alive requests:0
Total transferred:  10540 bytes
HTML transferred:   8000 bytes
Requests per second:883.06 [#/sec] (mean)
Time per request:   18.119 [ms] (mean)
Time per request:   1.132 [ms] (mean, across all concurrent requests)
Transfer rate:  454.46 [Kbytes/sec] received
Apache 2.0.50 + jk 1.2.6 + Tomcat 3.3.2 (via Coyote JK2 connector)
C:\Program Files\Apache Group\Apache2\bin>ab -k -n 20 -c 16 
http://machone/examples/servlet/HelloWorldExample
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.8 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, 
http://www.apache.org/

Benchmarking machone (be patient)
Completed 2 requests
Completed 4 requests
Completed 6 requests
Completed 8 requests
Completed 10 requests
Completed 12 requests
Completed 14 requests
Completed 16 requests
Completed 18 requests
Finished 20 requests
Server Software:Apache/2.0.50
Server Hostname:machone
Server Port:80
Document Path:  /examples/servlet/HelloWorldExample
Document Length:400 bytes
Concurrency Level:  16
Time taken for tests:   220.637261 seconds
Complete