Profile Image
Luis

Threads consuming CPU are not reported but Java JVM is taking up 100% CPU

Our java JVM process (Tomcat 8.5.56 running on OpenJDK Corretto 8) takes 100% CPU after a few hours of restarting Tomcat.

The threads dump does not show any thread consuming CPU. What could be happening? What is consuming high CPU? 

 

From the profiling data, G1 GC is not using more than 4% of CPU Time.



Report URL - https://fastthread.io/my-thread-report.jsp?p=c2hhcmVkLzIwMjEvMDUvMjgvLS1odG9wLmx1aXMubG9nLS05LTYtNDY7Oy0tanN0YWNrLmxvZy0tOS02LTQ2

  • g1gc

  • threadsconsumingcp

  • java

  • jvm

  • tomcat

  • openjdk

  • corretto

  • cputime

Please Sign In or to post your comment or answer

Profile Image

Ram Lakshmanan

Inorder to accurately point the lines of code causing the CPU spike, you need to analyze not only thread dumps but also 'top -H -p {PID}' command output, where {PID} is your Java application's process Id which is experiencing CPU spike. When you issue this command, it will list all the threads running in the application and amount of CPU each one of the thread consume. Once you have both the data, you can identify high CPU consuming thread and lines of code they are executing. You can either capture these artifacts and analyze them manually, or use the 14 day trial version of yCrash tool - which automatically captures  application-level data (thread dump, heap dump, Garbage Collection log) and system-level data (netstat, vmstat, iostat, top, top -H, dmesg,...). It marries these two datasets and generates an instant root cause analysis report. Here is more information on how to diagnose high CPU spike.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • g1gc

  • threadsconsumingcp

  • java

  • jvm

  • tomcat

  • openjdk

  • corretto

  • cputime