Folks,

I just submitted another performance optimization patch that should have
improved performance of HTTP header parsing by 10-15%. 

I reran the tests comparing performance of the Tomcat Coyote connector
and that of the connector based on HttpCommon code. According to
(admittedly very limited) tests based on HttpCommon code [1] and Apache
benchmark (ab) [3] Tomcat Coyote _appears_ merely 2% faster. Tomcat
Coyote HTTP connector is known to have been aggressively optimized for
high performance and low garbage generation, so I personally think these
results are basically good enough. There's no point in optimizing the
code any further until the API is frozen.

Now I am quite curious how HttpCommon compares to HttpClient 3.0 in
terms of performance. I'll run a few tests and report the results. 

Meanwhile, a peer review of the HttpCommon code would be much welcome

Oleg
====
[1]
http://svn.apache.org/repos/asf/jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java

[2]

[EMAIL PROTECTED] trunk]$ /opt/java2/bin/java -cp
http-common/bin:coyote-httpconnector/bin
tests.performance.PerformanceTest 8080 200
Request: GET /tomcat-docs/changelog.html HTTP/1.1
Average (nanosec): 9,604,055
Request: GET /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 3,855,820
Request failed: java.net.SocketException: Broken pipe (multiple times)
Request: POST /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 7,566,665

[EMAIL PROTECTED] trunk]$ /opt/java2/bin/java -cp
http-common/bin:coyote-httpconnector/bin
tests.performance.PerformanceTest 8888 200
Request: GET /tomcat-docs/changelog.html HTTP/1.1
Average (nanosec): 9,611,465
Request: GET /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 3,584,235
Request: POST /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 7,717,060

[3]

*** Tomcat Coyote GET tomcat-docs/changelog.html
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> 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 localhost (be patient)


Server Software:        Apache-Coyote/1.1
Server Hostname:        localhost
Server Port:            8080

Document Path:          /tomcat-docs/changelog.html
Document Length:        100541 bytes

Concurrency Level:      1
Time taken for tests:   7.454516 seconds
Complete requests:      9999
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9999
Total transferred:      1007649225 bytes
HTML transferred:       1005309459 bytes
Requests per second:    1341.33 [#/sec] (mean)
Time per request:       0.746 [ms] (mean)
Time per request:       0.746 [ms] (mean, across all concurrent
requests)
Transfer rate:          132004.82 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   0.2      0       4
Waiting:        0    0   0.0      0       1
Total:          0    0   0.2      0       4

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      0
  98%      0
  99%      1
 100%      4 (longest request)
*** Http Common GET tomcat-docs/changelog.html

This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> 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 localhost (be patient)


Server Software:        
Server Hostname:        localhost
Server Port:            8888

Document Path:          /tomcat-docs/changelog.html
Document Length:        100541 bytes

Concurrency Level:      1
Time taken for tests:   7.533847 seconds
Complete requests:      9999
Failed requests:        0
Write errors:           0
Keep-Alive requests:    9999
Total transferred:      1007379252 bytes
HTML transferred:       1005309459 bytes
Requests per second:    1327.21 [#/sec] (mean)
Time per request:       0.753 [ms] (mean)
Time per request:       0.753 [ms] (mean, across all concurrent
requests)
Transfer rate:          130579.77 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0    0   0.2      0       4
Waiting:        0    0   0.1      0       1
Total:          0    0   0.2      0       4

Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%      0
  90%      0
  95%      0
  98%      1
  99%      1
 100%      4 (longest request)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to