JVM instrumentation – Performance tuning
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.