tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerome Jar" <>
Subject Re: 100% cpu usage by "VM Thread" in tomcat
Date Sun, 23 Sep 2007 02:41:56 GMT
Hi, Lindsay,

Sorry for my ignorance, but seeing that you were trying to locate the
thread using "PID", I think perhaps it's wrong. I have the same
experience identifying such a CPU utilization issue on a Debian box
using a 2.6.x version kernel. I cannot recall whether on a 2.4.x
kernal linux box you can use ps to see "TID", the native thread id.
Well, maybe you can refer to!69F4725ED815E770!408.entry , this
is a summary after I resolving the same problem. Hope it can help.

On 9/22/07, Lindsay Patten <> wrote:
> I am looking for information on how to debug a problem. Any pointers to
> documentation, suggestions of approaches etc. would be much appreciated.
> I am having a problem with my tomcat server periodically going into a
> state where it is using up all the available cpu and providing very slow
> response.  None of the jsp or servlets on the site should take up a lot
> of cpu, they all just do relatively simple database queries and produce
> simple html pages from the results.  During the times when the cpu is
> busy the database will generally not be under any significant load.
> Top shows process 324 (0x144) as the busy process, and ps shows it
> having consumed a lot of cpu:
>   324 ?        S    837:41 /usr/java/jdk1.5.0_10/bin/java -Djava...
> Expecting to find that I had some error in my webapp I did a few thread
> dumps, but assuming that nid in the thread dump corresponds to pid from
> ps I found that the process that was spinning was "VM Thread":
> "VM Thread" prio=1 tid=0x08098a48 nid=0x144 runnable
> The thread dump does not give any additional information about this
> thread. I presume it is the Virtual Machine itself.
> If I look at the system status using the Tomcat manager webapp there are
> often requests listed with ridiculously large values in the Time column,
> several hundred seconds for jsp pages that only take a fraction of a
> second to generate, and I can cut an paste the request into my browser
> and the request will finish in a fraction of a second.
> Sometimes it seems that reloading some of the webapps can "fix" the
> problem, at least for a while - I don't know for sure, it could be
> coincidence, but if I don't do anything the problem can persist for long
> periods of time and then go away after a few webapp reloads.  I have
> tried to detect a pattern about which app reload solves the problem but
> it seems to be different different times.  vmstat doesn't show the
> machine as thrashing or using much IO (everything basically fits into
> physical memory).  The only thing I can think of is that the VM is going
> into a marathon garbage collection phase, but I don't know how to test
> that hypothesis, and it seems odd that even that could go on for lengthy
> periods of time.
> Help?!?
> JVM: jdk1.5.0_10
> Tomcat: apache-tomcat-6.0.13
> uname -a: Linux [hostname here] 2.4.34-grsec #27 SMP Mon Jan 22 21:19:29
> CST 2007 i686 unknown
> The system is a two cpu system with 4GB RAM, and when not in this
> spinning state it handles its load with 10-15% cpu load.
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

"Houston, we have a problem."

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

View raw message