From: fhanik Date: Thu, 22 Mar 2007 01:00:01 +0000 (+0000) Subject: Documented the Executor element X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=68e05969612ed217249c377b4f4ff67ad7599a5e;p=tomcat7.0 Documented the Executor element git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@521062 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f274a36e4..12c95b5aa 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -17,6 +17,10 @@
+ + Added support for shared thread pools by adding in the <Executor> + element as a nested element to the <Service> element. (fhanik) + 41666 Correct handling of boundary conditions for If-Unmodified-Since and If-Modified-Since headers. Patch provided by diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml index 99b62ad4c..659965d1e 100644 --- a/webapps/docs/config/ajp.xml +++ b/webapps/docs/config/ajp.xml @@ -173,6 +173,8 @@ with AJP enabled support for the Srevlet specification using the header recommended in the specification. The default value is false.

+ + @@ -217,6 +219,12 @@ with AJP enabled after accepting a connection, for the request URI line to be presented. The default value is infinite (i.e. no timeout).

+ + +

A reference to the name in an Executor element. + If this attribute is enabled, and the named executor exists, the connector will + use the executor, and all the other thread attributes will be ignored.

+

The number of milliseconds this Connector will wait, diff --git a/webapps/docs/config/executor.xml b/webapps/docs/config/executor.xml new file mode 100644 index 000000000..ff6556095 --- /dev/null +++ b/webapps/docs/config/executor.xml @@ -0,0 +1,95 @@ + + +]> + + + &project; + + + Filip Hanik + The Executor (thread pool) + + + + + +

+ +

The Executor represents a thread pool that can be shared + between components in Tomcat. Historically there has been a thread pool per + connector created but this allows you to share a thread pool, between (primarly) connector + but also other components when those get configured to support executors

+ + +

The executor has to implement the org.apache.catalina.Executor interface.

+ +

The executor is a nested element to the Service element. + And in order for it to be picked up by the connectors, the Executor element has to appear + prior to the Connector element in server.xml

+
+ + +
+ + + +

All implementations of Executor + support the following attributes:

+ + + + +

The class of the implementation. The implementation has to implement the + org.apache.catalina.Executor interface. + This interface ensures that the object can be referenced through its name attribute + and that implements Lifecycle, so that it can be started and stopped with the container. + The default value for the className is org.apache.catalina.core.StandardThreadExecutor

+
+ + +

The name used to reference this pool in other places in server.xml. + The name is required and must be unique.

+
+ +
+ +
+ + + +

+ The default implementation supports the following attributes:

+ + + + +

(int) The thread priority for threads in the executor, the default is Thread.NORM_PRIORITY

+
+ +

(boolean) Whether the threads should be daemon threads or not, the default is true

+
+ +

(String) The name prefix for each thread created by the executor. + The thread name for an individual thread will be namePrefix+threadNumber

+
+ +

(int) The max number of active threads in this pool, default is 200

+
+ +

(int) The minimum number of threads always kept alive, default is 25

+
+ +

(int) The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less + or equal to minSpareThreads. Default value is 60000(1 minute)

+
+
+ + +
+
+ + + + + diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml index 42a5990f2..83bc0d76e 100644 --- a/webapps/docs/config/http.xml +++ b/webapps/docs/config/http.xml @@ -208,6 +208,8 @@ support for the Servlet specification using the header recommended in the specification. The default value is false.

+ + @@ -271,6 +273,12 @@ after accepting a connection, for the request URI line to be presented. The default value is 60000 (i.e. 60 seconds).

+ + +

A reference to the name in an Executor element. + If this attribute is enabled, and the named executor exists, the connector will + use the executor, and all the other thread attributes will be ignored.

+

The number of milliseconds this Connector will wait, @@ -396,12 +404,14 @@ - Set to true to use the NIO thread pool executor. The default value is true. +

Set to true to use the NIO thread pool executor. The default value is true. 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 FIFO queue. If set to true(default) then the max pool size is the maxThreads attribute and the core pool size is the minSpareThreads. + This value is ignored if the executor attribute is present and points to a valid shared thread pool. +

The number of threads to be used to accept connections. Increase this value on a multi CPU machine, diff --git a/webapps/docs/config/project.xml b/webapps/docs/config/project.xml index a29279a7e..b9d464b74 100644 --- a/webapps/docs/config/project.xml +++ b/webapps/docs/config/project.xml @@ -21,6 +21,10 @@ +

+ + +