IBM Support

IBM Pattern Modeling and Analysis Tool for Java Garbage Collector (PMAT)

How To


Summary

IBM Pattern Modeling and Analysis Tool for Java Garbage Collector is a tool that parses verbose GC trace, analyzes Java heap usage, and recommends key configurations based on pattern modeling of Java heap usage.

Objective

  1. Download: https://www14.software.ibm.com/cgi-bin/weblap/lap.pl?popup=Y&la_formnum=&li_formnum=L-JHWG-85RFJN&accepted_url=https://public.dhe.ibm.com/software/websphere/appserv/support/tools/pmat/ga458.jar
  2. Open a terminal or command prompt and change directory to where you downloaded the JAR file.
  3. Ensure that Java is on your PATH to run the tool.
  4. Launch the tool:
    java -Xmx1g -jar ga*.jar
Note: PMAT has no new development and therefore, in general, we recommend using the IBM Monitoring and Diagnostic Tools - Garbage Collection and Memory Visualizer (GCMV) tool which has more recent development and a similar feature set (recommendation engine, etc.).

Environment

Pattern Modeling and Analysis Tool for IBM® Java™ Garbage Collector (PMAT) parses verbose GC trace, analyzes Java heap usage, and recommends key configurations based on pattern modeling of Java heap usage.
Main screen
When the JVM (Java virtual machine) cannot allocate an object from the current heap because of lack of space, a memory allocation fault occurs, and the Garbage Collector is invoked. The first task of the Garbage Collector is to collect all the garbage that is in the heap. This process starts when any thread calls the Garbage Collector either indirectly as a result of allocation failure or directly by a specific call to System.gc(). The first step is to get all the locks needed by the garbage collection process. This step ensures that other threads are not suspended while they are holding critical locks. All other threads are then suspended. Garbage collection can then begin. It occurs in three phases: Mark, Sweep, and Compaction (optional).
Verbose GC is a command-line option that one can supply to the JVM at start-up time. The format is: -verbose:gc or -verbosegc. This option switches on a substantial trace of every garbage collection cycle. The format for the generated information is not designed and therefore varies among various platforms and releases.
This trace should allow one to see the gross heap usage in every garbage collection cycle. For example, one could monitor the output to see the changes in the free heap space and the total heap space. This information can be used to determine whether garbage collections are taking too long to run; whether too many garbage collections are occurring; and whether the JVM crashed during garbage collection.
How does it work?
PMAT analyzes verbose GC traces by parsing the traces and building pattern models. PMAT recommends key configurations by executing a diagnosis engine and pattern modeling algorithm. If there are any errors related with Java heap exhaustion or fragmentation in the verbose GC trace, PMAT can diagnose the root cause of failures. PMAT provides rich chart features that graphically display Java heap usage.
The following features are included:
  • GC analysis
  • GC table view
  • Allocation failure summary
  • GC usage summary
  • GC duration summary
  • GC graph view
  • GC pattern analysis
  • Zoom in/out/selection/center of chart view
  • Option of changing chart color.
The tool can also parse Java HotSpot garbage collector traces, including the following:
  • Serial collector
  • Throughput/parallel collector
  • Concurrent collector
  • Incremental/train collector
For additional details, see the Help documentation from within the tool.
 
The HeapAnalyzer tool is provided as is without any warranty or support; however, we try to fix and enhance the tool as time permits. The tool was originally created by Jinwoo Hwang. Since Mr. Hwang's departure from IBM, the tool is maintained as time permits by Kevin Grigorenko (kevin.grigorenko@us.ibm.com).
Note: PMAT has no new development and therefore, in general, we recommend using the IBM Monitoring and Diagnostic Tools - Garbage Collection and Memory Visualizer (GCMV) Eclipse plugin (installation instructions) which has active development and a similar feature set (recommendation engine, etc.).

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG9NGS","label":"IBM Java"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
05 January 2022

UID

ibm11109973