Vengatc techology logs

JVM instrumentation – Performance tuning

Posted in Architecture, java, JVM, Performance by vengatc on October 3, 2008

Performance monitoring

Sun has done an excelent work in integrating remote management into JVM. They have build in SNMP Agent like  capablity into the JVM. The SNMP OID is synonomous to the MBeans and SNMP MIB is synonomous to the MBean Server.

This beautiful capability allows you to connect to the JVM and monitor the crime we have done in the code with regard to the run time memory/CPU and thread utilization. I became a lover of this feature. I always thought to build this capability into the applications we build. This feature is a  real bliss for architects.

Head on Jump

To have a first hand experience with the JVM instrumentation , just follow the simple steps…

1. Have Java 5.0 installed in your system and create an java program that runs until you forcefully stop it. If you have a framework with threadpools, resource management etc.. it is a good example.

2. Run your java program with this additional parameter.

Java -Dcom.sun.management.jmxremote  xyz.jar

This command publishes the MBServer in the JVM as a RMI resource for the Jconsole to connect to.

3. Start Jconsole and connect to the Program in your connection dialogue box.

Jconsole will alow you to monitor the Memory used and the threads used. Identify deadlocks etc etc..

See the peformance scaling for an Enterprise Information Integration framework that i recently wrote.. This is a heavy ETL and EII kind of tool that aggregate data from multiple databases. You would difinitly need to have some performance numbers for its production run.  jconsole tool would help you prove the roboustness your ur framework by showing the memory and thread occupancy and how controlled they are admist heavy load on the framework.

Advertisements
Tagged with:

One Response

Subscribe to comments with RSS.

  1. Neil Coffey said, on October 5, 2008 at 3:12 pm

    Readers interested in more of the nitty-gritty of how to actually plug profiling into their code may also be interested in the article I wrote on thread profiling in Java 5 (see link).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: