TomcatExpert

Understanding the Apache Tomcat blocking IO connector

posted by SpringSource on October 27, 2009 02:24 PM

Why active threads remain high after load decreases using the Blocking IO connector

There are a number of different http connectors that can be used with Tomcat. They are:

• Blocking IO
• Non-blocking IO
• Native/Apache Portable Runtime (APR)

The blocking IO connector is the default http connector. With this connector each request is handled by a dedicated thread (obtained from a pool) until the request is complete at which point the thread is returned to the pool to be re-used by another request.

The difference between the connectors are described at the end of the following document as provided by the Apache Server Foundation: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

The thread pool used by the blocking IO connector will increase in size but never decrease. Not reducing the thread pool size reduces complexity and gives a slight performance improvement at the cost of increased resource usage during periods of light load.

The blocking IO connector is recommended over the other connectors for:

• stability
• non-SSL
• performance if keep-alive is disabled (it is in your configuration)

If you were using SSL and/or keep-alive and not running on Solaris then the APR connector would be preferred. If you were using SSL and/or keep-alive on Solaris then NIO would be preferred.

For more than 10 years, SpringSource employees have been supporting Apache technologies, with unparalleled experience and commitment to the Apache Software Foundation. More than 400 of the Fortune 500 count on SpringSource to support their mission-critical business applications. Leaders of the Apache Software Foundation, including Board Members, work at SpringSource and dedicate a significant amount of time further developing the Apache Tomcat open source project. Over the last 2 years, 95% of the issues fixed in the Apache Tomcat project were fixed by SpringSource engineers. For more information on how SpringSource can help your enterprise, see the SpringSource website, or call 800/444-1935.

Comments

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.