JConsole Threads Tab - Understanding Information

I am running JBoss 5. I can see memory retention increasing over time. The number of active threads is increasing. The next stacktrace is taken from the active thread, which is one of many threads (these are threads that are added as time). What can I learn from stacktrace? How can I go deeper and have a clearer idea of ​​what's going on?

Name: WorkManager (2) -92 State: WAITING on java.u til.concurrent.locks.AbstractQueuedSynchronizer $ ConditionObject @ 4e2e52 Total blocked: 1 Total waited: 1

Stack trace: sun.misc.Unsafe.park (native) java.util.concurrent.locks.LockSupport.park (LockSupport.java:158) java.util.concurrent.locks.AbstractQueuedSynchronizer $ ConditionObject.await (Abstract.jueuedavaSynchronizer 1925) java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:358) java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:947) java.util.concurrent.ThreadPoolExecutor: $ Worker.avaExecutor 907) java.lang.Thread.run (Thread.java:619)

Thanks, Rod

+2


source to share


3 answers


This thread looks like it is waiting for getTask (), that is, it is just waiting for some work.

New threads will appear as requests come in, you don't have to worry about that unless there are a lot of threads in there doing the actual work.



Memory usage will increase over time until the JVM decides to garbage collect. If it keeps growing and running GC from jconsole doesn't matter, you may have a memory leak. Finding leaks can be difficult, but you can use MAT to make it easier.

+1


source


You can learn about this by running JConsole from JDK1.6 or JDK1.7. JConsole.exe in JDK1.5 is old school.



0


source


I suggest starting with jvisualvm profiling . You will end up with graphs over heap usage times, threads, garbage collection, etc.

You can also take a bunch of heaps with jmap and then parse with jhat or mat .

0


source







All Articles