0% found this document useful (0 votes)
5 views

Java6 Heapdump

Uploaded by

retrogradeview
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Java6 Heapdump

Uploaded by

retrogradeview
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

®

IBM Software Group

IBM® SDK, Java™ Technology Edition, V6

Heap dump changes

© 2007 IBM Corporation


Updated December 17, 2007

This presentation discusses the changes in how the virtual machine produces heap dumps
in the IBM SDK for Java Version 6.

Java6_Heapdump.ppt Page 1 of 11
IBM Software Group

Agenda
 Heap dump overview
 Change in default heap dump behavior
 Heap dump compression and performance improvements

2
Heap dump changes © 2007 IBM Corporation

This presentation will start with a brief description of heap dumps and then discuss the
changes in heap dump behavior in the IBM SDK for Java Version 6, including the default
conditions for producing heap dumps, file compression, and performance improvements.

Java6_Heapdump.ppt Page 2 of 11
IBM Software Group

Heap dump overview


 Heap dumps contain information about the Java heap
All objects in the heap
Identifying Java class
References to other objects in the heap
 Default heap dump format is binary
Text format is also available
 Control heap dump behavior using –Xdump:heap command-line
options
 Memory Dump Diagnostic for Java is the recommended tool for
processing heap dumps

3
Heap dump changes © 2007 IBM Corporation

The term heap dump describes the IBM Virtual Machine for Java mechanism that
generates a dump of all the live objects that are on the Java heap; that is, those that are
being used by the running Java application. The heap dump file contains information
about all of the objects in the heap, including the identifying Java class for each object and
references to other objects in the heap and is produced when the Java heap is exhausted.
This dump is stored in a portable heap dump file, a compressed binary format, by default.
The text or classic heap dump is a list of all object instances in the heap, including object
type, size, and references between objects, in a human-readable format. It is in EBCDIC
on z/OS and in ASCII on all other platforms. Use the environment variable
IBM_JAVA_HEAPDUMP_TEXT=true to enable text heap dumps. You can use various
tools on the heap dump output to analyze the composition of the objects on the heap and,
for example, help to find the objects that are controlling large amounts of memory on the
Java heap and the reason why the garbage collector cannot collect them. The preferred
heap dump analysis tool, Memory Dump Diagnostic for Java, is available in IBM Support
Assistant.

Java6_Heapdump.ppt Page 3 of 11
IBM Software Group

Heap dump default behavior


 In V5, heap dumps were produced by default for any uncaught
java/lang/OutOfMemoryError event
 In V6, heap dumps are produced for any
java/lang/OutOfMemoryError event triggered by the virtual machine
This change was also backported to Java 5 SR5

-Xdump:heap:events=systhrow,
-Xdump:heap:events=systhrow,
filter=java/lang/OutOfMemoryError,
filter=java/lang/OutOfMemoryError,
label=C:\test\heapdump.%Y%m%d.%H%M%S.%pid.phd,
label=C:\test\heapdump.%Y%m%d.%H%M%S.%pid.phd,
...
...

 Use the –Xdump:what command-line option to see all default dump


agents

4
Heap dump changes © 2007 IBM Corporation

In Version 5, heap dumps were produced by default for any uncaught OutOfMemoryError
event, including OutOfMemoryErrors produced in user code. The default behavior has
changed in Version 6, so that heap dumps are produced for OutOfMemoryErrors triggered
by the virtual machine. The new systhrow event has been added in this release to support
this new heap dump behavior. The example on the slide shows a portion of the default
dump agent configuration for heap dumps. You can see the default behavior for all of the
dump agents in your Java environment by running with the –Xdump:what command-line
parameter.

Java6_Heapdump.ppt Page 4 of 11
IBM Software Group

Heap dump compression


 Binary heap dump compression
Previous release did not take advantage of PHD
compression allowed in the file format specification
As a result, on 64-bit platforms, dumps could be up to 10
times larger than similar dumps from earlier releases
PHD format dumps now take advantage of the
compression supported in the file format specification
Dump processing tools continue to work as expected

5
Heap dump changes © 2007 IBM Corporation

When moving from Version 1.4.2 to Version 5.0 of the SDK, some users experienced a
large increase in heap dump file size on 64-bit platforms. In Version 6, the Portable heap
dump file format has been updated to allow for more compression in binary heap dump
files. Many users may notice substantially smaller heap dump files when moving from the
Version 5.0 SDK to Version 6. While the underlying PHD format has changed, heap dump
processing tools like the Memory Dump Diagnostic for Java will continue to function as
expected.

Java6_Heapdump.ppt Page 5 of 11
IBM Software Group

Heap dump performance


 Improved dump performance
Able to write the dump file faster because of:
 Compression – there is less data to write to file
 Caching – crossing over to do native file system operations less frequently
Writing heap dumps can be over 10 times faster than
Java 5

6
Heap dump changes © 2007 IBM Corporation

In conjunction with the updates for compressed heap dump files, it is now also much faster
to write heap dumps to disk. Clearly, it will be faster to record smaller files in the file
system. In addition to the compression scheme, the SDK now incorporates a caching
mechanism for writing heap dump files so that the dump generator performs fewer native
file operations. Crossing over the boundary to write data out to a file is an expensive
operation, so this new caching scheme offers substantial performance improvements. In
some cases in Version 6, you will see that heap dumps are generated more than 10 times
as fast as similar heap dump files in the Java 5 SDK.

Java6_Heapdump.ppt Page 6 of 11
IBM Software Group

Section

Summary and references

7
Heap dump changes © 2007 IBM Corporation

This section contains a summary and reference.

Java6_Heapdump.ppt Page 7 of 11
IBM Software Group

Summary
 Heap dumps contain information about the Java heap
 Produced by the new systhrow trigger on
java/lang/OutOfMemoryError events
 Heap dump compression and performance improvements

8
Heap dump changes © 2007 IBM Corporation

Heap dump files contain information about all of the objects in the Java heap. A new
dump trigger – systhrow – was introduced in this release to allow heap dumps to be
generated by default when the virtual machine triggers an OutOfMemoryError event.
Heap dump files are also smaller than in the previous release, and this compression and a
new caching scheme mean that the heap dump generator can produce heap dump files
faster.

Java6_Heapdump.ppt Page 8 of 11
IBM Software Group

References
 Diagnostics guide
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp

9
Heap dump changes © 2007 IBM Corporation

Java6_Heapdump.ppt Page 9 of 11
IBM Software Group

Feedback
Your feedback is valuable
You can help improve the quality of IBM Education Assistant content to better
meet your needs by providing feedback.
 Did you find this module useful?

 Did it help you solve a problem or answer a question?

 Do you have suggestions for improvements?

Click to send e-mail feedback:


mailto:[email protected]?subject=Feedback_about_Java6_Heapdump.ppt

This module is also available in PDF format at: ../Java6_Heapdump.pdf

10
Heap dump changes © 2007 IBM Corporation

You can help improve the quality of IBM Education Assistant content by providing
feedback.

Java6_Heapdump.ppt Page 10 of 11
IBM Software Group

Trademarks, copyrights, and disclaimers


The following terms are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both:
IBM
Java, and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
Product data has been reviewed for accuracy as of the date of initial publication. Product data is subject to change without notice. This document could include
technical inaccuracies or typographical errors. IBM may make improvements or changes in the products or programs described herein at any time without notice. Any
statements regarding IBM's future direction and intent are subject to change or withdrawal without notice, and represent goals and objectives only. References in this
document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM
operates or does business. Any reference to an IBM Program Product in this document is not intended to state or imply that only that program product may be used.
Any functionally equivalent program, that does not infringe IBM's intellectual property rights, may be used instead.
Information is provided "AS IS" without warranty of any kind. THE INFORMATION PROVIDED IN THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY
WARRANTY, EITHER EXPRESS OR IMPLIED. IBM EXPRESSLY DISCLAIMS ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE OR NONINFRINGEMENT. IBM shall have no responsibility to update this information. IBM products are warranted, if at all, according to the terms and
conditions of the agreements (for example, IBM Customer Agreement, Statement of Limited Warranty, International Program License Agreement, etc.) under which
they are provided. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly
available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other
claims related to non-IBM products.
IBM makes no representations or warranties, express or implied, regarding non-IBM products and services.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents or copyrights. Inquiries regarding
patent or copyright licenses should be made, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. All customer examples described are presented
as illustrations of how those customers have used IBM products and the results they may have achieved. The actual throughput or performance that any user will
experience will vary depending upon considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration,
and the workload processed. Therefore, no assurance can be given that an individual user will achieve throughput or performance improvements equivalent to the
ratios stated here.
© Copyright International Business Machines Corporation 2007. All rights reserved.
Note to U.S. Government Users - Documentation related to restricted rights-Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule
Contract and IBM Corp.

11
Heap dump changes © 2007 IBM Corporation

Java6_Heapdump.ppt Page 11 of 11

You might also like