Skip to main content

High CPU utilization

1 reply [Last post]
zorbaz
Offline
Joined: 2009-07-06
Points: 0

Hello,

I suddenly experience a java process comsuming high CPU. I want to know any recommended approaches in debugging high CPU utilization issues.

I did some research on the GC aspect, but i feel if it is due to GC, it should happen consistently with respect to load of the Java Process.

Any recommendations on this... is greatly appreciated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
linuxhippy
Offline
Joined: 2004-01-07
Points: 0

Best is probably to use a profiler and have a look what's going on.
A very non intrusive profiler is hprof, which can be activated with -Xrunhprof:cpu=samples . it will generate a file called java.hprof.txt with a summary at the end which function was how long on the top of the stack.
Of course there are way more advanced profilers, but they also need more time to get used to and often have higher overhead.

With -XX:+PrintGCDetails you can see when and how often a GC cycle occurs, but I don't think that is your problem.

- Clemens