Search code examples
javajakarta-eeprofilingprofilerjvisualvm

Java profiling - detect what causes a spike


I am trying to to detect what causes massive spikes in our Java struts bases web application deployed in Jboss. I have used Yourkit and visualVM to take dumps and have analysed dumps but these spikes are momentary and by the time the dump is taken nothing remains.

Question is - is there a way to detect what is causing a spike in the runtime?


Solution

  • As most likely garbage collection can cause such an issue, I'd recommend enabling the garbage collection logging in the JVM using these command line options:

    • -Xloggc:<path and filename to log to>
    • -XX:+PrintGCDetails