Final-WSTE06-IBM Pattern Modeling and Analysis Tool
Final-WSTE06-IBM Pattern Modeling and Analysis Tool
Agenda
What is PMAT?
Features
How does it work?
Verbose garbage collection trace
Prerequisite
Definitions of headers in tables/charts
Views
How to run PMAT and analyze data
Case Studies ( I, II and III )
Q&A
What is PMAT?
Pattern Modeling and Analysis Tool for IBM Java Garbage
Collector (PMAT) parses IBM SDK verbose Garbage Collect
(GC) logs and provides statistics, charts, analysis, and
recommendations for key Java™ heap configurations.
PMAT parses the IBM verbose GC trace and provides a
comprehensive analysis of the Java heap usage. It then
recommends key configurations by first executing a diagnosis
engine and then employing a pattern modeling algorithm in
order to make recommendations to optimize the Java heap
usage for a given JVM cycle.
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.
Features
Diagnoses Java heap potential problems by
analyzing verbose GC traces.
What is verbosegc?
Verbose GC is a command-line option that you supply to the
JVM at startup 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 architected and therefore varies from
platform to platform and release to release.
This trace should allow you to see the gross heap usage in
every garbage collection cycle. For example, you could
monitor the output to see the changes in the free heap space
and the total heap space. You can use this information to
determine:
Whether garbage collections are taking too long to run
Whether too many garbage collections are occurring
Whether the JVM crashed during garbage collection
Prerequisite
Java 2 Runtime Environment 1.4.1 or higher
Log files with verbose:gc enabled on IBM SDK
1.3.x and 1.4.x. (Log files taken from Non-IBM
SDKs are not supported yet)
Views
GC analysis
GC Table View
AF summary
GC usage summary
GC duration summary
GC Graph View
GC trend analysis
Zoom in/out/selection/center of graph view
Initial screen
IBM PMAT is
displayed with
console
window.
If there’s any possibility that Java heap usage might increase, IBM PMAT
provides a ratio(%) based on Java Heap Occupancy Model.
Ratio of 0% means Java heap occupancy could stay L bytes at the time
of T0 + (T1 – T0) x 2 where L (bytes) is Java heap occupancy at the time
of T1 (T0:JVM start time T1:JVM stop time)
GC View
Display GC
table view by
clicking on
Analysis -> GC
View
GC View
You can sort
each column
by clicking on
column header.
Graph View
Chart View
Red vertical dotted
line represents
“Exhausted”,
where there was
insufficient space
to satisfy
allocation failure.
You can click on
buttons to display
other data (Used,
Free and so on)
Graph View
Free,
used, total
size are
displayed
Graph View
Compact
and Sweep
buttons are
enabled.
You can
click on
Zoom In/Out
and Center
to navigate
chart in
various
levels.
Graph View
You can
select a
point to
display
its table
view
Usage Summary
Display
usage
summary
by clicking
on
Analysis-
>Usage
Summary
Usage Summary
Duration Summary
Duration
Summary
by clicking
on
Analysis-
.Duration
Summary
Duration Summary
AF Summary
AF Summary
by clicking
on Analysis-
>AF
Summary
AF Summary
Display
usage
summary
by clicking
on
Analysis-
>Usage
Summary
Option
Display
option by
clicking on
View-
>Option
Option
Option
You can also change
color of chart
Option
You can also
change color of
chart
Clear Console
You can
clear logs
in console
by clicking
on View-
>Clear
Console
Objects that are on the Java heap are usually mobile; that is, the
garbage collector (GC) can move them around if it decides to
resequence the heap. Some objects, however, cannot be moved
either permanently or temporarily and might cause problems. One
of them is a class block.
-Xknnnn
Useful links
IBM SDK Diagnostics Guides
http://www-106.ibm.com/developerworks/java/jdk/diagnosis/
IBM Pattern Modeling and Analysis Tool for IBM Java
Garbage Collector http://www.alphaworks.ibm.com/tech/pmat
IBM HeapAnalyzer
http://www.alphaworks.ibm.com/tech/heapanalyzer
Webcast replay: Using IBM HeapAnalyzer to diagnose Java
heap issues
http://www.ibm.com/support/docview.wss?uid=swg27006624
Questions?