From f10f3c314077a16fb6602cfc96d40d5db684e685 Mon Sep 17 00:00:00 2001
From: markt
- WARNING: The NIO connector for AJP - is experimentaland not yet fully functional. -
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.