Wednesday, May 20, 2009

Explore VisualVM

'VisualVM' to be simple, it is a graphical interface tool helps in profiling J2SE applications. It is a very lightweight tool which integrates many JDK tools and provides a single stop profiling and monitoring capabilities. While there are some industry standard tools already in use, I am here comparing the tools which are actually developed for different purpose altogether but have some features in common. The comparison is with HP Diagnostics J2EE Probe!

I have considered a few tabs(features) of HP Diagnostics J2EE probe so that it can be comparable with VisualVM. Mostly HP Diagnostics J2EE probe is used for profiling J2EE applications.

Parameter
VisualVM
HP Diagnostics - J2EE Probe
Initial foot print
Default monitor shows minimum CPU usage with both visualvm and j2ee probe on the same system



System
Good system performance metrics are shown in the probe while these are not completely available in default visualvm (we can extend if we like..)



Heap
VisualVM Heap graph is more informative at a glance.





Visual GC
Probe is showing some GC activity while it is not visible in visualvm. May be as the GC collections per sec value is too low to be visible on the graph.



Threads
Thread information is good and almost the same apart from an extra element - 'threads created per sec' present in probe. (this is useful during load tests)



Threaddump
Thread dump gives info. related to all the threads where as we can have an option of selecting a specific thread and get its trace in probe. I think this is useful as thread dump increase largely with time and load.


VisualVM After 1 day
Tomcat has been running since 1 day and VisualVM's Profiling is still going on. The changes observed are very minimal increase in CPU usage(either might be because of Tomcat or VisualVM). There is an increase in Heap usage and also observed some GC activities. A forced GC has been triggered later.(see graph 2)





Next Steps..

1. Extending VisualVM to have http/xml interface so that it can run at one place but can be viewed from different locations. Also this feature helps to embed VisualVM's output into any tool which can parse XML. -- VisualVM ~ VirtualVM
2. Extending to J2EE

want to see what other visualvm explorers are thinking along with me -> http://java.sun.com/community/javavisualvm/

1 comment: