3

my application consumes 100% CPU - out of 200%. When I create a thread dump either by calling Thread.getAllStackTraces() or kill -3, I see that there are threads that consume a lot of CPU time, but their stack traces unavailable. They are not shown while CPU profiling.

The threads are: HandshakeCompletedNotify-Thread, Keep-Alive-Timer and process reaper. Their stack traces however are unavailable.

Keep-Alive-Timer and HandshakeCompletedNotify-Thread should not be native as far as I understand. In addition we don't have special permissions in java.policy or java.security files in jre.

How can I get the stack traces of these threads in order to solve the high CPU consumption?

posdef
  • 6,498
  • 11
  • 46
  • 94
Artiom Gourevitch
  • 786
  • 1
  • 11
  • 22

1 Answers1

0

Use a profiling tool like visual vm

It has CPU sampling and profiling support to show where the CPU consumption is.

Aaron
  • 5,931
  • 4
  • 27
  • 31