the -Djava.net.preferIPv4Stack=true value to your command line</p>
<attributes>
+ <attribute name="useSendfile" required="false">
+ <p>(bool)Use this attribute to enable or disable sendfile capability.
+ The default value is <code>true</code>
+ </p>
+ </attribute>
<attribute name="useExecutor" required="false">
- <p>Set to true to use the NIO thread pool executor. The default value is <code>true</code>.
+ <p>(bool)Set to true to use the NIO thread pool executor. The default value is <code>true</code>.
If set to false, it uses a thread pool based on a stack for its execution.
Generally, using the executor yields a little bit slower performance, but yields a better
fairness for processing connections in a high load environment as the traffic gets queued through a
</p>
</attribute>
<attribute name="acceptorThreadCount" required="false">
- <p>The number of threads to be used to accept connections. Increase this value on a multi CPU machine,
+ <p>(int)The number of threads to be used to accept connections. Increase this value on a multi CPU machine,
although you would never really need more than 2. Also, with a lot of non keep alive connections,
you might want to increase this value as well. Default value is 1.</p>
</attribute>
<attribute name="pollerThreadCount" required="false">
- <p>The number of threads to be used to run for the polling events. Default value is 1.
+ <p>(int)The number of threads to be used to run for the polling events. Default value is 1.
Can't see a reason to go above that. But experiment and find your own results.</p>
</attribute>
<attribute name="pollerThreadPriority" required="false">
- <p>The priority of the poller threads.
+ <p>(int)The priority of the poller threads.
The default value is <code>java.lang.Thread#NORM_PRIORITY</code>.
See the JavaDoc for the java.lang.Thread class for more details on
what this priority means.
</p>
</attribute>
<attribute name="acceptorThreadPriority" required="false">
- <p>The priority of the acceptor threads. The threads used to accept new connections.
+ <p>(int)The priority of the acceptor threads. The threads used to accept new connections.
The default value is <code>java.lang.Thread#NORM_PRIORITY</code>.
See the JavaDoc for the java.lang.Thread class for more details on
what this priority means.
</attribute>
<attribute name="selectorTimeout" required="false">
- <p>The time in milliseconds to timeout on a select() for the poller.
+ <p>(int)The time in milliseconds to timeout on a select() for the poller.
This value is important, since connection clean up is done on the same thread, so dont set this
value to an extremely high one.</p>
</attribute>
<attribute name="useComet" required="false">
- <p>Whether to allow comet servlets or not, Default value is true.</p>
+ <p>(bool)Whether to allow comet servlets or not, Default value is true.</p>
</attribute>
<attribute name="socket.directBuffer" required="false">
- <p>Boolean value, whether to use direct ByteBuffers or java mapped ByteBuffers. Default is <code>false</code>
+ <p>(bool)Boolean value, whether to use direct ByteBuffers or java mapped ByteBuffers. Default is <code>false</code>
<br/>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 <code>-XX:MaxDirectMemorySize=256m</code></p>
</attribute>
<attribute name="socket.rxBufSize" required="false">
- <p>The socket receive buffer (SO_RCVBUF) size in bytes. Default value is 25188</p>
+ <p>(int)The socket receive buffer (SO_RCVBUF) size in bytes. Default value is 25188</p>
</attribute>
<attribute name="socket.txBufSize" required="false">
- <p>The socket send buffer (SO_SNDBUF) size in bytes. Default value is 43800</p>
+ <p>(int)The socket send buffer (SO_SNDBUF) size in bytes. Default value is 43800</p>
</attribute>
<attribute name="socket.appReadBufSize" required="false">
- <p>Each connection that is opened up in Tomcat get associated with a read and a write ByteBuffer
+ <p>(int)Each connection that is opened up in Tomcat get associated with a read and a write ByteBuffer
This attribute controls the size of these buffers. 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.</p>
</attribute>
<attribute name="socket.appWriteBufSize" required="false">
- <p>Each connection that is opened up in Tomcat get associated with a read and a write ByteBuffer
+ <p>(int)Each connection that is opened up in Tomcat get associated with a read and a write ByteBuffer
This attribute controls the size of these buffers. 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.</p>
+ For an extreme amount of keep alive connections, decrease this number or increase your heap size.
+ <br/>
+ The default value here is pretty low, you should up it if you are not dealing with tens of thousands
+ concurrent connections.</p>
</attribute>
<attribute name="socket.bufferPool" required="false">
- <p>The Nio connector uses a class called NioChannel that holds elements linked to a socket.
+ <p>(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. unlimited cache, and 0, no cache.</p>
</attribute>
<attribute name="socket.bufferPoolSize" required="false">
- <p>The NioChannel pool can also be size based, not used object based. The size is calculated as follows:<br/>
+ <p>(int)The NioChannel pool can also be size based, not used object based. The size is calculated as follows:<br/>
NioChannel buffer size = read buffer size + write buffer size<br/>
SecureNioChannel buffer size = application read buffer size + application write buffer size + network read buffer size + network write buffer size<br/>
The value is in bytes, the default value is 1024*1024*100 (100MB)
</p>
</attribute>
<attribute name="socket.processorCache" required="false">
- <p>Tomcat will cache SocketProcessor objects to reduce garbage collection.
+ <p>(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. unlimited cache, and 0, no cache.</p>
</attribute>
<attribute name="socket.keyCache" required="false">
- <p>Tomcat will cache KeyAttachment objects to reduce garbage collection.
+ <p>(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. unlimited cache, and 0, no cache.</p>
</attribute>
<attribute name="socket.eventCache" required="false">
- <p>Tomcat will cache PollerEvent objects to reduce garbage collection.
+ <p>(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. unlimited cache, and 0, no cache.</p>
</attribute>
<attribute name="socket.tcpNoDelay" required="false">
- <p>same as the standard setting <code>tcpNoDelay</code>. Default value is false</p>
+ <p>(bool)same as the standard setting <code>tcpNoDelay</code>. Default value is false</p>
</attribute>
<attribute name="socket.soKeepAlive" required="false">
- <p>Boolean value for the socket's keep alive setting (SO_KEEPALIVE). Default is <code>false</code>. </p>
+ <p>(bool)Boolean value for the socket's keep alive setting (SO_KEEPALIVE). Default is <code>false</code>. </p>
</attribute>
<attribute name="socket.ooBInline" required="false">
- <p>Boolean value for the socket OOBINLINE setting. Default value is <code>true</code></p>
+ <p>(bool)Boolean value for the socket OOBINLINE setting. Default value is <code>true</code></p>
</attribute>
<attribute name="socket.soReuseAddress" required="false">
- <p>Boolean value for the sockets reuse address option (SO_REUSEADDR). Default value is <code>true</code></p>
+ <p>(bool)Boolean value for the sockets reuse address option (SO_REUSEADDR). Default value is <code>true</code></p>
</attribute>
<attribute name="socket.soLingerOn" required="false">
- <p>Boolean value for the sockets so linger option (SO_LINGER). Default value is <code>true</code>.
+ <p>(bool)Boolean value for the sockets so linger option (SO_LINGER). Default value is <code>true</code>.
This option is paired with the soLingerTime value.</p>
</attribute>
<attribute name="socket.soLingerTime" required="false">
- <p>Value in seconds for the sockets so linger option (SO_LINGER). Default value is <code>25</code> seconds.
+ <p>(bool)Value in seconds for the sockets so linger option (SO_LINGER). Default value is <code>25</code> seconds.
This option is paired with the soLinger value.</p>
</attribute>
<attribute name="socket.soTimeout" required="false">
- <p>Value in milliseconds for the sockets read timeout (SO_TIMEOUT). Default value is <code>5000</code> milliseconds.</p>
+ <p>(int)Value in milliseconds for the sockets read timeout (SO_TIMEOUT). Default value is <code>5000</code> milliseconds.</p>
</attribute>
<attribute name="socket.soTrafficClass" required="false">
- <p>Value between 0 and 255 for the traffic class on the socket, <code>0x04 | 0x08 | 0x010</code></p>
+ <p>(byte)Value between 0 and 255 for the traffic class on the socket, <code>0x04 | 0x08 | 0x010</code></p>
</attribute>
<attribute name="socket.performanceConnectionTime" required="false">
- <p>The first value for the performance settings. Default is 1, see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a></p>
+ <p>(int)The first value for the performance settings. Default is 1, see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a></p>
</attribute>
<attribute name="socket.performanceLatency" required="false">
- <p>The second value for the performance settings. Default is 0, see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a></p>
+ <p>(int)The second value for the performance settings. Default is 0, see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a></p>
</attribute>
<attribute name="socket.performanceBandwidth" required="false">
- <p>The third value for the performance settings. Default is 1, see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a></p>
+ <p>(int)The third value for the performance settings. Default is 1, see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a></p>
</attribute>
<attribute name="selectorPool.maxSelectors" required="false">
- <p>The max selectors to be used in the pool, to reduce selector contention.
+ <p>(int)The max selectors to be used in the pool, to reduce selector contention.
Use this option when the command line o.a.t.u.net.NioSelectorShared value is set to false.
Default value is 200.</p>
</attribute>
<attribute name="selectorPool.maxSpareSelectors" required="false">
- <p>The max spare selectors to be used in the pool, to reduce selector contention.
+ <p>(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:ed.
Use this option when the command line o.a.t.u.net.NioSelectorShared value is set to false.
Default value is -1 (unlimited)</p>
</attribute>
<attribute name="command-line-options" required="false">
<p>The following command line options are available for the NIO connector:<br/>
- <code>-Dorg.apache.tomcat.util.net.NioSelectorShared=true|false</code> - default is true.
+ <code>-Dorg.apache.tomcat.util.net.NioSelectorShared=true|false</code> - default is <code>true</code>.
Set this value to false if you wish to use a selector for each thread.
the property. If you do set it to false, you can control the size of the pool of selectors by using the
selectorPool.maxSelectors attribute</p>