This will be a helpful document:


Matthew Laird wrote:
We're pulling our hair out with a Tomcat issue.

We have an in-house application running on Tomcat 5.5 with Sun JDK 1.6.
 The machine is an x86 dual-CPU, quad core (8 cores total) with 16GB of
RAM.  We're running OpenSuSE 10.2, 32-bit.  Java memory size set to 2GB,
multi-threaded GC enabled.

What occurs is when a user clicks a certain kind of analysis on the
website, data is retrieved from a database and then a lot of formatting
is done before returning it to the user.  This typically causes 100% CPU
usage for this thread for a few minutes (bioinformatics application,
that part isn't going to change).

Unfortunately what then occurs is all other threads suddenly become
unusably slow.  The entire web application grinds to a halt until this
thread that's running hot completes.

Looking at top, it appears that these threads aren't spreading among all
the cores.  I see one core go to 100% usage, and the others stay at 100%
idle.  So we're running multi-thread, but because everything is staying
on the same core, we're still getting thread contention that's bringing
the entire application to its knees.

The only time I began to see the other cores actually start being used
is when I enabled multi-threaded GC.  But that doesn't give much
improvement since the threads responding the web requests are still all
on the same core.

I'm not sure how to convince the Tomcat/Java container to spread its
threads among the cores.


To start a new topic, e-mail:
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to