[jboss-user] [Beginner's Corner] - configuring thread-pool-jboss-beans.xml
Raymond Eperen
do-not-reply at jboss.com
Fri Dec 10 17:34:54 EST 2010
Raymond Eperen [http://community.jboss.org/people/rvaneperen] created the discussion
"configuring thread-pool-jboss-beans.xml"
To view the discussion, visit: http://community.jboss.org/message/575504#575504
--------------------------------------------------------------
I need to be sure I understand what I read about setting the max threads on jBoss 6. We are trying to set up for some load testing so I need it to be where it would be in production. Here is what I found in the docs:
max-threads - optional; specifies the maximum number of threads which may be running concurrently. Attributes are:
* count - optional float attribute; specifies a fixed quantity.
* per-cpu - optional float attribute; specifies a quantity which is multiplied by the number of available CPUs. Both quantities are then added and the final result is the actual count used.
so if I use:
<bounded-queue-thread-pool-executor name="ThreadPool" blocking="true">
<thread-factory name="ShortTasksThreadFactory"/>
<queue-length count="500" per-cpu="200"/>
<core-threads count="100" per-cpu="50"/>
<max-threads count="200" per-cpu="100"/>
<keepalive-time time="30" unit="seconds"/>
<task-filter>
<clear-context-classloader/>
<clear-tls/>
</task-filter>
</bounded-queue-thread-pool-executor>
<bounded-queue-thread-pool-executor name="ThreadPool" blocking="true">
<thread-factory name="ShortTasksThreadFactory"/>
<queue-length count="500" per-cpu="200"/>
<core-threads count="100" per-cpu="50"/>
<max-threads count="200" per-cpu="100"/>
<keepalive-time time="30" unit="seconds"/>
<task-filter>
<clear-context-classloader/>
<clear-tls/>
</task-filter>
</bounded-queue-thread-pool-executor>
am I getting a max thread count of 100 x 2 cpu + 200 = 400?
also, is this keepalive setting good for a production environment? Any other changes you would suggest in order for the server instance to handle a fairly heavy load?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/575504#575504]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101210/285627f2/attachment.html
More information about the jboss-user
mailing list