Databases Reference
In-Depth Information
4. Watch out for the suspects that are using a large amount of memory.
How it works...
The jrcmd command-line tool issues a command to the JVM to generate the heap dump.
The heap dump file is written to the $DOMAIN_HOME root directory with a filename of the
pattern, heapdump_<date>.hprof .
The JVM runs a full GC before saving the heap dump, so the size of the file is the size of the
live Java objects. If a heap is reaching 3 GB of utilization after a full GC, the size of the file will
be 3 GB.
In this recipe, the heap dump was opened and analyzed by using the Eclipse Memory Analyzer
application. The analysis indicated the com.myapp.cache.CacheUtil class is an offender,
occupying about 80 percent of the total heap size. The following screenshot displays an
ArrayList named CACHE_LIST ; it is the variable of the com.myapp.cache.CacheUtil class
and consumes 200 MB of the 256 MB configured for the heap.
 
Search WWH ::




Custom Search