6 Analyzing Garbage Collection Data
HPjmeter allows you to process garbage collection (GC) data from Java virtual machines.
Separating the GC data collection step from the analysis step has the following advantages:
•The data analysis can be done at a different time and on a different platform than was used to run the application. For example, it can be done on a desktop system or on a laptop.
•A
•The data files obtained naturally facilitate comparison of different runs or creation of a history of performance improvements.
For detailed analysis of the efficiency of garbage collection, it is useful to take a close look at garbage collection patterns. A study of patterns of garbage collection can help you determine whether or not the best GC type and heap size are being applied appropriately during the application run. You can also use detailed GC data to uncover problems in the application programming.
With the collection of verbose GC data, HPjmeter is able to present extensive details about the memory usage and garbage collection (GC) exhibited when an application is running. Details are presented in a data summary and in graphic visualizers that can be adjusted to focus on particular aspects of the data.
Obtaining Garbage Collection Data
The
The GC viewer automatically opens when you open an Xverbosegc or Xloggc file from the HPjmeter console.
Data Collection with -Xverbosegc
To run your application with an option to capture the garbage collection information, use the following command:
$ java ...
The following table lists examples of supported
$ java ...
To see the availability of HPjmeter metrics from
01 | 0 prints after every old generation garbage collection or after a full GC. |
| 1 prints after every garbage collection (default). |
:file=[stdoutstderrfilename] stderr (default) directs output to standard error stream. stdout directs output to standard output stream.
80 Analyzing Garbage Collection Data