WildFly Threads Subsystem Configuration: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* Define Thread Pools for HTTP Connectors https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/sect-Connector_Configuration.html#Define_Thread_Pools_for_HTTP_Connector_in_JBoss_Enterprise_Application_Platform | * Define Thread Pools for HTTP Connectors https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/sect-Connector_Configuration.html#Define_Thread_Pools_for_HTTP_Connector_in_JBoss_Enterprise_Application_Platform | ||
* JBoss Developer Thread Pool Configuration https://developer.jboss.org/wiki/ThreadPoolConfiguration | |||
=Internal= | =Internal= | ||
Line 15: | Line 16: | ||
<pre> | <pre> | ||
<subsystem xmlns="urn:jboss:domain:threads:1.1"> | <subsystem xmlns="urn:jboss:domain:threads:1.1"> | ||
<thread-factory name="http-connector-factory" thread-name-pattern="HTTP-%t" priority="9" group-name="http-threads"/> | <thread-factory name="http-connector-thread-factory" thread-name-pattern="HTTP-%t" priority="9" group-name="http-threads"/> | ||
... | ... | ||
</subsystem> | </subsystem> | ||
Line 38: | Line 39: | ||
<max-threads count="500"/> | <max-threads count="500"/> | ||
<keepalive-time time="30" unit="seconds"/> | <keepalive-time time="30" unit="seconds"/> | ||
<thread-factory name="http-connector-factory"/> | <thread-factory name="http-connector-thread-factory"/> | ||
</unbounded-queue-thread-pool> | </unbounded-queue-thread-pool> | ||
</subsystem> | </subsystem> | ||
</pre> | </pre> | ||
==unbounded-queue-thread-pool== | |||
===max-thread-count=== | |||
== | ===keepalive-time time=== | ||
Specifies the length of time after which idle threads will exit. Attributes are: | |||
* <tt>time</tt> - specifies the amount of time, as an integer. | |||
* <tt>unit</tt> - specifies the time unit, e.g. "seconds", "ms", "min", etc. | |||
==thread-factory== | ===thread-factory=== | ||
The <tt><thread-factory></tt> <tt>name</tt> should refer the thread factory previously defined. | The <tt><thread-factory></tt> <tt>name</tt> should refer the thread factory previously defined. | ||
=Configure the Thread Pool on the Target Component= | |||
For an example of how to configure the thread pool on a JBossWeb connector, see: | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[JBossWeb WildFly Subsystem Configuration#Thread_Pool_Configuration|JBossWeb Connector Thread Pool Configuration]] | |||
</blockquote> |
Latest revision as of 22:03, 8 June 2016
External
- Define Thread Pools for HTTP Connectors https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.4/html/Administration_and_Configuration_Guide/sect-Connector_Configuration.html#Define_Thread_Pools_for_HTTP_Connector_in_JBoss_Enterprise_Application_Platform
- JBoss Developer Thread Pool Configuration https://developer.jboss.org/wiki/ThreadPoolConfiguration
Internal
Overview
This page describes the steps required to define an executor and its associated thread factory. For a description behind the WildFly executor model, see WildFly Threads Subsystem Executor Model. The example below is fit to be used with a JBossWeb HTTP connector.
Thread Factory Configuration
<subsystem xmlns="urn:jboss:domain:threads:1.1"> <thread-factory name="http-connector-thread-factory" thread-name-pattern="HTTP-%t" priority="9" group-name="http-threads"/> ... </subsystem>
where
name
thread-name-pattern
priority
group-name
Executor Configuration
<subsystem xmlns="urn:jboss:domain:threads:1.1"> ... <unbounded-queue-thread-pool name="http-thread-pool"> <max-threads count="500"/> <keepalive-time time="30" unit="seconds"/> <thread-factory name="http-connector-thread-factory"/> </unbounded-queue-thread-pool> </subsystem>
unbounded-queue-thread-pool
max-thread-count
keepalive-time time
Specifies the length of time after which idle threads will exit. Attributes are:
- time - specifies the amount of time, as an integer.
- unit - specifies the time unit, e.g. "seconds", "ms", "min", etc.
thread-factory
The <thread-factory> name should refer the thread factory previously defined.
Configure the Thread Pool on the Target Component
For an example of how to configure the thread pool on a JBossWeb connector, see: