Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Concurrency, Threading, GC, Advanced Java and more ... 

News April 2012

Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning

Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:

Training online
Threading Essentials course

Get rid of your performance problems and memory leaks!

Back to newsletter 137 contents

Java7 u4 was released a few days ago. Normally I don't bother mentioning updates, but this one has a few items of interest to us in the performance community: G1 becomes official; a new jcmd command-line diagnostic tool; and finally we can get notified of garbage collections! (I meant to discuss your replies to last month's question about initial heap size, but that will have to wait).

A note from this newsletter's sponsor

Free Java Performance Tool - From AppDynamics
Fight fires in production with less than 2% overhead.
Gain complete visibility into your java app. Free Download!

Of course you want specifics - so did I. So, firstly, the G1 garbage collector is now a fully supported garbage collector, which means - to me at least - that it's now expected to be usable and relatively stable. That's good news, my initial testing on one of the more problematic JVMs I'm dealing with at the moment showed it to provide a nice improvement in GC handling.

Next, there is a new jcmd command-line diagnostics framework - with a basic set of commands. jcmd with no args works like jps; then jcmd PID help will list available commands for the jvm running with process ID PID, jcmd PID help COMMAND prints help for the particular COMMAND and, consistently, jcmd PID COMMAND COMMANDARGS will execute the COMMAND using the COMMANDARGS arguments. I've not yet used this, and initially I'm not sure there's going to be anything new that you don't already get from the other already existing command-line tools, but this puts it all together in one command framework. I suspect it's easily extensible, and very likely you can install your own handlers easily enough, so we're likely moving into a world of standardised customised command line capability for JVMs.

Finally, and we've waited for this for so long I'd given up hope of it ever coming, you can get notifications from the GarbageCollectorMXBean of GC events when they occur. At last, we can actually have GC analysis and display tools that don't require access to the GC logs and aren't sampler based. To get your notifs, access the GarbageCollectorMXBean and addNotificationListener on it to get your callbacks (I think it needs to be cast to the sun mxbean). Your callback should check that the notification type is a GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION, then retrieve the GC data by calling GarbageCollectionNotificationInfo.from(notif.getUserData()).

Now on to all our usual links to Java performance tools, news, articles, and the extracted tips from all of this month's referenced articles.

A note from this newsletter's sponsor

ManageEngine: Application Performance Management for Java EE Apps.
Monitor App Servers: JBoss, WebSphere, WebLogic, JVMs and JMX Apps.
*** Monitor up to 25 App Servers, Databases & Servers at $795/Yr***.


Java performance tuning related news.


Java performance tuning related tools.

A note from this newsletter's sponsor

New Relic RPM - The Revolution in Java Performance Management is Here!
Affordable SaaS APM tool to monitor, troubleshoot, and tune apps
running on Websphere, Weblogic, Tomcat, Jetty, JBoss, Solr, Resin


Jack Shirazi

Back to newsletter 137 contents

Last Updated: 2023-09-28
Copyright © 2000-2023 All Rights Reserved.
All trademarks and registered trademarks appearing on are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
RSS Feed:
Trouble with this page? Please contact us