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 February 2017

JProfiler
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


JProfiler
Get rid of your performance problems and memory leaks!


Back to newsletter 195 contents

I'm going to ask for your help again this month - and possibly educate you while I do. I was asked if I could provide a page of heap dump analysers alongside the other tools I list (see the menu line above starting with "Tools:" which starts with GC log analysers and ends with Thread analysers.

A note from this newsletter's sponsor

New Relic - Try New Relic today and get your free Data Nerd shirt!
Free SaaS APMto monitor, troubleshoot, and tune apps
running on Websphere, Weblogic, Tomcat, Jetty, JBoss, Solr, Resin

For anyone who doesn't know what a heap analyser is, you want to use one when you get a heap dump, so that you can analyse the objects you have in memory at the time of the dump. You can get a heap dump with both the live and dead objects (it won't GC first), or you can get a heap dump to first execute a full GC then dump, so that you only see the retained live objects. You'd want the latter to diagnose a memory leak, the former can be useful when you're trying to understand what garbage you're producing that may be churning your memory.

Getting a heap dump is straightforward, you can use any of jmap; the JMX com.sun.management.HotSpotDiagnostic.dumpHeap() method (from any JMX aware tool, such as jconsole); the -XX:+HeapDumpOnOutOfMemoryError flag (which does what it says); and jcmd [PID] GC.heap_dump [PATH_TO_DUMPFILE].

(As an aside, rather than doing a full dump and using an analyser, you can often get away with doing just a couple of jmap -histo calls and comparing the output in a spreadsheet to find out what objects you're leaking or churning, -histo also supports a live option, ie -histo:live).

Heap dumps analysers (ie tools that will load a heap dump and then let you investigate what is in memory) that I know about are: jhat (discontinued in Java 9), JVisualVM, Eclipse MAT, the JOverflow plugin in JMC (Java Mission Control), jxray. I know that there are also a bunch of commercial profilers (like JProfiler) that include heap dump analysis capability (if you want yours to get into the new "Heap dumps analysers" page, please tell me). If you know about any other analysers you've used, please tell me - and then in turn I'll tell all of you when I create that page and add it to my Tools listed at the top of the page.

Heap dumps analysers are pretty good nowadays, with sensible "wizard" like capability to suggest what is causing a memory leak if that's what you're using it for - and I'd guess that's the most frequent use for analysing heap dumps.

Now on to our links to tools, articles, news, talks, blogs. And if you need the tips from this month's articles and talks, as ever they are extracted into this month's tips page.

News

Java performance tuning related news.

Tools

Java performance tuning related tools.

A note from this newsletter's sponsor

Site24x7.com : Deep dive Application Performance Monitoring
Fix performance issues with Java, .NET and Ruby platforms
Monitor app instance at $12/Month. 30-day free trial. Sign Up!

Articles

Jack Shirazi


Back to newsletter 195 contents


Last Updated: 2025-03-25
Copyright © 2000-2025 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/news195.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us