tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Cox" <>
Subject Re: Tomcat - threads / throughput limits?
Date Thu, 08 Nov 2007 15:51:18 GMT
On Nov 8, 2007 10:41 AM,  <> wrote:
> Hi,
> We have an architecture where we have many tomcat app servers load
> balanced by apache at the front.
> In resolving our current bottleneck i used JProfiler to see what the
> tomcat applications were doing and when under high load there are a lot of
> threads which are blocked on this:
> org.apache.tomcat.util.threads.ThreadPool$
> This suggests that they are spending all their time waiting for tomcat to
> run them, either way they're not runnable anyway.
> Our app pushes through huge quantites of very quick requests - typically
> each request takes a total of 50ms.  We have a limit of 300 connections on
> our AJP connector.
> The point of blocked threads occurs way before we hit that limit.  At the
> same time neither the machine is busy, nor are there any obvious problems
> with memory usage for the instance.
> And indeed; Adding more app servers keeps the load to each one down and
> does resolve the problem - i.e. we can increase throughput.
> So; My question is, is there a reccomended limit to how many threads
> tomcat can handle before it spends more time managing threads than it does
> doing real work?
> Thanks!
> Dan

Not quite answering your question, but re your "blocked" threads, do
you mean something like the following in a stack dump?

"http80-Processor131" daemon prio=5 tid=0x00baa7c0 nid=0x10f9 in
Object.wait() [0xa5e81000..0xa5e819c8]
        at java.lang.Object.wait(Native Method)
        - waiting on <0xc9d99d20> (a
        at java.lang.Object.wait(
        at org.apache.tomcat.util.threads.ThreadPool$
        - locked <0xc9d99d20> (a

FWIW, I always interpreted those as HTTP servicing threads waiting for
something to do (i.e. not a bad thing at all).

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message