We use the jboss 4.0.3SP1 version and sometimes we observe a high peak of CPU (more than 150%), and if I look to the number of activethread I see 217 threads. However the maximum number of thread in the pool is configured to 25.
JBoss System Threads
<!-- How long a thread will live without any tasks in MS -->
<!-- The max number of threads in the pool -->
<!-- The max number of tasks before the queue is full -->
<!-- The behavior of the pool when a task is added and the queue is full.
abort - a RuntimeException is thrown
run - the calling thread executes the task
wait - the calling thread blocks until the queue has room
discard - the task is silently discarded without being run
discardOldest - check to see if a task is about to complete and enque
the new task if possible, else run the task in the calling thread
As the maximum number of thread is lower than the number of Active thread, can it explain the peak of CPU consumption? Because we create and destroy a lot of thread which are not pooled?
And of course do we have to increase the maximum number of thread in the pool and what is the limit?
by advance thanks a lot for your help.
There are also the HTTP threads which are defined in server/xxx/deploy/jbossweb-tomcat55.sar/server.xml. A Thread dump should indicate what threads are running and what they are doing.