From: markt Date: Tue, 17 May 2011 17:24:36 +0000 (+0000) Subject: Add remaining attributes to documentation X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f10f3c314077a16fb6602cfc96d40d5db684e685;p=tomcat7.0 Add remaining attributes to documentation AJP-NIO now passes Servlet TCK - remove experimental label git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1104422 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 1448ff006..8d3579a22 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -46,8 +46,7 @@ - 51145: Add an experimental (not all TCK tests pass at the - moment) AJP-NIO connector. (markt/rjung) + 51145: Add an AJP-NIO connector. (markt/rjung) diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml index 95dd5010f..a25e7f907 100644 --- a/webapps/docs/config/ajp.xml +++ b/webapps/docs/config/ajp.xml @@ -161,10 +161,6 @@ Take a look at our Connector Comparison chart.

-

- WARNING: The NIO connector for AJP - is experimentaland not yet fully functional. -

@@ -485,6 +481,111 @@ + + +

The following attributes are specific to the NIO connector.

+ + + + +

(bool)Boolean value, whether to use direct ByteBuffers or java mapped + ByteBuffers. Default is false.
+ When you are using direct buffers, make sure you allocate the + appropriate amount of memory for the direct memory space. On Sun's JDK + that would be something like -XX:MaxDirectMemorySize=256m. +

+
+ + +

(int)Each connection that is opened up in Tomcat get associated with + a read ByteBuffer. This attribute controls the size of this buffer. By + default this read buffer is sized at 8192 bytes. For lower + concurrency, you can increase this to buffer more data. For an extreme + amount of keep alive connections, decrease this number or increase your + heap size.

+
+ + +

(int)Each connection that is opened up in Tomcat get associated with + a write ByteBuffer. This attribute controls the size of this buffer. By + default this write buffer is sized at 8192 bytes. For low + concurrency you can increase this to buffer more response data. For an + extreme amount of keep alive connections, decrease this number or + increase your heap size.
+ The default value here is pretty low, you should up it if you are not + dealing with tens of thousands concurrent connections.

+
+ + +

(int)The NIO connector uses a class called NioChannel that holds + elements linked to a socket. To reduce garbage collection, the NIO + connector caches these channel objects. This value specifies the size of + this cache. The default value is 500, and represents that + the cache will hold 500 NioChannel objects. Other values are + -1 for unlimited cache and 0 for no cache.

+
+ + +

(int)The NioChannel pool can also be size based, not used object + based. The size is calculated as follows:
+ NioChannel + buffer size = read buffer size + write buffer size
+ SecureNioChannel buffer size = application read buffer size + + application write buffer size + network read buffer size + + network write buffer size
+ The value is in bytes, the default value is 1024*1024*100 + (100MB).

+
+ + +

(int)Tomcat will cache SocketProcessor objects to reduce garbage + collection. The integer value specifies how many objects to keep in the + cache at most. The default is 500. Other values are + -1 for unlimited cache and 0 for no cache.

+
+ + +

(int)Tomcat will cache KeyAttachment objects to reduce garbage + collection. The integer value specifies how many objects to keep in the + cache at most. The default is 500. Other values are + -1 for unlimited cache and 0 for no cache.

+
+ + +

(int)Tomcat will cache PollerEvent objects to reduce garbage + collection. The integer value specifies how many objects to keep in the + cache at most. The default is 500. Other values are + -1 for unlimited cache and 0 for no cache.

+
+ + +

(int)The max selectors to be used in the pool, to reduce selector + contention. Use this option when the command line + org.apache.tomcat.util.net.NioSelectorShared value is set + to false. Default value is 200.

+
+ + +

(int)The max spare selectors to be used in the pool, to reduce + selector contention. When a selector is returned to the pool, the system + can decide to keep it or let it be GC'd. Use this option when the + command line org.apache.tomcat.util.net.NioSelectorShared + value is set to false. Default value is -1 (unlimited).

+
+ + +

The following command line options are available for the NIO + connector:
+ -Dorg.apache.tomcat.util.net.NioSelectorShared=true|false + - default is true. Set this value to false if you wish to + use a selector for each thread. When you set it to false, you can + control the size of the pool of selectors by using the + selectorPool.maxSelectors attribute.

+
+ +
+
+

The APR/native implementation supports the following attributes in @@ -540,8 +641,6 @@ -

WARNING: The NIO connector for AJP - is experimentaland not yet fully functional.

Below is a small chart that shows how the connectors differentiate.

Java Blocking Connector Java Nio Blocking Connector APR/native Connector