Hot Method Or Routine Analysis - IBM Power7 Optimization And Tuning Manual

Table of Contents

Advertisement

Verbose GC Log
The verbose GC log is a key tool to understanding the memory characteristics of a particular
workload. The information that is provided in the log can be used to guide tuning decisions to
minimize GC impact and improve overall performance. Logging can be activated with the
-verbose:gc option and is directed to the command terminal. Logging can be redirected to a
file
file with the -Xverbosegclog:<
> option.
Verbose logs capture many types of GC events, such as regular GC cycles, allocation
failures, heap expansion and contraction, events related to concurrent marking, and
scavenger collections. Verbose logs also show the approximate length of time many events
take, the number of bytes processed (if applicable), and other relevant metrics. Information
relevant to many of the tuning issues for GC can be obtained from the log, such as
appropriate GC policies, optimal constant heap size, optimal min and max free space factors,
and growth and shrink sizes. For a detailed description of verbose log output, consult the
material on this subject in the Java Diagnostics Guide, available at:
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/topic/com.ibm.java.doc.diagn
ostics.60/diag/tools/gcpd_verbosegc.html
Garbage collection and memory visualizer
For large, long-running workloads, verbose logs can quickly grow in size, making them
difficult to work with and to analyze an application's behavior over time. The Garbage
Collection and Memory Visualizer is a tool that can parse verbose GC logs and present them
in a visual manner using graphs and other diagrams, allowing trends and totals to be easily
and quickly recognized. The graphs can be used to determine the minimum and maximum
heap usage, growth and shrink rates over time, and identify oscillating behaviors. This
information can be especially helpful when you choose optimal GC parameters. The GC and
Memory Visualizer can also compare multiple logs side by side, which can aid in testing
various options in isolation and determining their effects.
For more information about the GC and Memory Visualizer, see Java diagnostics, IBM style,
Part 2: Garbage collection with the IBM Monitoring and Diagnostic Tools for Java – Garbage
Collection and Memory Visualizer, available at:
http://www.ibm.com/developerworks/java/library/j-ibmtools2
Java Health Center
The Java Health Center is the successor to both the GC and Memory Visualizer and the Java
Lock Monitor. It is an all-in-one tool that provides information about GC activity, memory
usage, and lock contention. The Health Center also functions as a profiler, providing
sample-based statistics on method execution. The Health Center functions as an agent of the
JVM being monitored and can provide information throughout the life of a running application.
For more information about the Java Health Center, see Java diagnostics, IBM style, Part 5:
Optimizing your application with the Health Center, available at:
https://www.ibm.com/developerworks/java/library/j-ibmtools5
For more information, see 7.4, "Java garbage collection tuning" on page 130.

Hot method or routine analysis

A CPU profile shows a breakdown of the time that is spent in Java methods and JNI or
system routines. Investigate any hot methods or routines to determine if the concentration of
execution time in them is warranted or whether there is poor coding or other issues.
177
Appendix B. Performance tooling and empirical performance analysis

Advertisement

Table of Contents
loading

This manual is also suitable for:

Power7+

Table of Contents