How to increase number of threads in tomcat thread pool?

Mahmoud Saleh picture Mahmoud Saleh · Jun 19, 2011 · Viewed 108.1k times · Source

i just want to know How to increase number of threads in tomcat thread pool ? and what number to set the max too, i don't know what's appropriate ?

Answer

Elias Dorneles picture Elias Dorneles · Apr 12, 2012

You would have to tune it according to your environment.

Sometimes it's more useful to increase the size of the backlog (acceptCount) instead of the maximum number of threads.

Say, instead of

<Connector ... maxThreads="500" acceptCount="50"

you use

<Connector ... maxThreads="300" acceptCount="150"

you can get much better performance in some cases, cause there would be less threads disputing the resources and the backlog queue would be consumed faster.

In any case, though, you have to do some benchmarks to really know what is best.