You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2007/03/22 02:00:02 UTC
svn commit: r521062 - in /tomcat/tc6.0.x/trunk/webapps/docs: changelog.xml
config/ajp.xml config/executor.xml config/http.xml config/project.xml
Author: fhanik
Date: Wed Mar 21 18:00:01 2007
New Revision: 521062
URL: http://svn.apache.org/viewvc?view=rev&rev=521062
Log:
Documented the Executor element
Added:
tomcat/tc6.0.x/trunk/webapps/docs/config/executor.xml
Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/ajp.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/project.xml
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=521062&r1=521061&r2=521062
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Wed Mar 21 18:00:01 2007
@@ -17,6 +17,10 @@
<section name="Tomcat 6.0.11 (remm)">
<subsection name="Catalina">
<changelog>
+ <add>
+ Added support for shared thread pools by adding in the <Executor>
+ element as a nested element to the <Service> element. (fhanik)
+ </add>
<fix>
<bug>41666</bug> Correct handling of boundary conditions for
If-Unmodified-Since and If-Modified-Since headers. Patch provided by
Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/ajp.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/ajp.xml?view=diff&rev=521062&r1=521061&r2=521062
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/ajp.xml Wed Mar 21 18:00:01 2007
@@ -173,6 +173,8 @@
support for the Srevlet specification using the header recommended in the
specification. The default value is <code>false</code>.</p>
</attribute>
+
+
</attributes>
@@ -216,6 +218,12 @@
<p>The number of milliseconds this <strong>Connector</strong> will wait,
after accepting a connection, for the request URI line to be
presented. The default value is infinite (i.e. no timeout).</p>
+ </attribute>
+
+ <attribute name="executor" required="false">
+ <p>A reference to the name in an <a href="executor.html">Executor</a> 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.</p>
</attribute>
<attribute name="keepAliveTimeout" required="false">
Added: tomcat/tc6.0.x/trunk/webapps/docs/config/executor.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/executor.xml?view=auto&rev=521062
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/config/executor.xml (added)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/executor.xml Wed Mar 21 18:00:01 2007
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!DOCTYPE document [
+ <!ENTITY project SYSTEM "project.xml">
+]>
+<document url="executor.html">
+
+ &project;
+
+ <properties>
+ <author email="fhanik@apache.org">Filip Hanik</author>
+ <title>The Executor (thread pool)</title>
+ </properties>
+
+<body>
+
+
+<section name="Introduction">
+
+ <p>The <strong>Executor</strong> 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</p>
+
+
+ <p>The executor has to implement the <code>org.apache.catalina.Executor</code> interface.</p>
+
+ <p>The executor is a nested element to the <a href="service.html">Service</a> 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</p>
+</section>
+
+
+<section name="Attributes">
+
+ <subsection name="Common Attributes">
+
+ <p>All implementations of <strong>Executor</strong>
+ support the following attributes:</p>
+
+ <attributes>
+
+ <attribute name="className" required="false">
+ <p>The class of the implementation. The implementation has to implement the
+ <code>org.apache.catalina.Executor</code> interface.
+ This interface ensures that the object can be referenced through its <code>name</code> attribute
+ and that implements Lifecycle, so that it can be started and stopped with the container.
+ The default value for the className is <code>org.apache.catalina.core.StandardThreadExecutor</code></p>
+ </attribute>
+
+ <attribute name="name" required="true">
+ <p>The name used to reference this pool in other places in server.xml.
+ The name is required and must be unique.</p>
+ </attribute>
+
+ </attributes>
+
+ </subsection>
+
+ <subsection name="Standard Implementation">
+
+ <p>
+ The default implementation supports the following attributes:</p>
+
+ <attributes>
+
+ <attribute name="threadPriority" required="false">
+ <p>(int) The thread priority for threads in the executor, the default is <code>Thread.NORM_PRIORITY</code></p>
+ </attribute>
+ <attribute name="daemon" required="false">
+ <p>(boolean) Whether the threads should be daemon threads or not, the default is <code>true</code></p>
+ </attribute>
+ <attribute name="namePrefix" required="false">
+ <p>(String) The name prefix for each thread created by the executor.
+ The thread name for an individual thread will be <code>namePrefix+threadNumber</code></p>
+ </attribute>
+ <attribute name="maxThreads" required="false">
+ <p>(int) The max number of active threads in this pool, default is <code>200</code></p>
+ </attribute>
+ <attribute name="minSpareThreads" required="false">
+ <p>(int) The minimum number of threads always kept alive, default is <code>25</code></p>
+ </attribute>
+ <attribute name="maxIdleTime" required="false">
+ <p>(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 <code>60000</code>(1 minute)</p>
+ </attribute>
+ </attributes>
+
+
+ </subsection>
+</section>
+
+
+</body>
+
+</document>
Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml?view=diff&rev=521062&r1=521061&r2=521062
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/http.xml Wed Mar 21 18:00:01 2007
@@ -208,6 +208,8 @@
support for the Servlet specification using the header recommended in the
specification. The default value is <code>false</code>.</p>
</attribute>
+
+
</attributes>
@@ -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).</p>
</attribute>
+
+ <attribute name="executor" required="false">
+ <p>A reference to the name in an <a href="executor.html">Executor</a> 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.</p>
+ </attribute>
<attribute name="keepAliveTimeout" required="false">
<p>The number of milliseconds this <strong>Connector</strong> will wait,
@@ -396,12 +404,14 @@
<attributes>
<attribute name="useExecutor" required="false">
- Set to true to use the NIO thread pool executor. The default value is <code>true</code>.
+ <p>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
FIFO queue. If set to true(default) then the max pool size is the <code>maxThreads</code> attribute
and the core pool size is the <code>minSpareThreads</code>.
+ This value is ignored if the <code>executor</code> attribute is present and points to a valid shared thread pool.
+ </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,
Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/project.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/project.xml?view=diff&rev=521062&r1=521061&r2=521062
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/config/project.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/project.xml Wed Mar 21 18:00:01 2007
@@ -21,6 +21,10 @@
<item name="Service" href="service.html"/>
</menu>
+ <menu name="Executors">
+ <item name="Executor" href="executor.html"/>
+ </menu>
+
<menu name="Connectors">
<item name="HTTP" href="http.html"/>
<item name="AJP" href="ajp.html"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org