You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2005/08/22 00:23:30 UTC

[HttpCommon] Tomcat HTTP connector vs HttpCommon in classic IO and NIO modes

Folks,

These are the latest numbers comparing performance of Tomcat HTTP
connector with that of HttpCommon based connector running in classic IO
and NIO modes. In summary HttpCommon in NIO mode tends to be 4-8% faster
than standard Tomcat connector and 6-20% faster than HttpCommon in
classic IO mode. I fully admit that the numbers _may_ be wrong due to
some differences in configuration. Nonetheless, the idea of using
blocking NIO without selectors (that is, without socket read timeouts in
their classic form) on the server side is clearly worth pursuing in my
opinion

What is actually quite interesting as well is that Tomcat appears to
lose connections when bombarded with large POST requests. HttpCommon
seem to hold up in both classic IO and NIO mode.

Anyways, please verify the numbers and review the code. Meanwhile I'll
be working on a piece of code intended to drop idle connections blocked
in NIO read operation.

Oleg
====

(Tomcat) org.apache.coyote.http11.Http11Protocol
======================================================
Request: GET /tomcat-docs/changelog.html HTTP/1.1
Average (nanosec): 10,110,000
Request: GET /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 3,913,590
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request failed: java.net.SocketException: Broken pipe
Request: POST /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 8,336,140

(HttpCommon) org.apache.http.coyote.HttpProtocol (Classic IO mode)
======================================================
Request: GET /tomcat-docs/changelog.html HTTP/1.1
Average (nanosec): 10,207,125
Request: GET /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 4,191,255
Request: POST /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 9,388,095

(HttpCommon) org.apache.http.coyote.HttpProtocol (NIO mode)
======================================================
Request: GET /tomcat-docs/changelog.html HTTP/1.1
Average (nanosec): 9,578,910
Request: GET /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 3,762,625
Request: POST /servlets-examples/servlet/RequestInfoExample HTTP/1.1
Average (nanosec): 7,699,675

Tomcat config file:
http://svn.apache.org/repos/asf/jakarta/httpclient/trunk/coyote-httpconnector/src/tests/server.xml
Test app:
http://svn.apache.org/repos/asf/jakarta/httpclient/trunk/coyote-httpconnector/src/tests/tests/performance/PerformanceTest.java


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org