Wednesday, September 14, 2011

IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer Version 1.1

IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer Version 1.1

The IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer is a Java heap analysis tool based on the Eclipse Memory Analyzer.

Memory Analyzer Overview
The IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer (Memory Analyzer) brings the diagnostic capabilities of the Eclipse Memory Analyzer Tool (MAT) to the IBM Virtual Machines for Java.
Memory Analyzer extends Eclipse MAT version 1.1 using the Diagnostic Tool Framework for Java (DTFJ) which enables Java heap analysis using operating system level dumps and IBM Portable Heap Dumps (PHD)
Using Memory Analyzer will enable you to:
  • Diagnose and resolve memory leaks involving the Java heap
  • Derive architectural understanding of your Java application through footprint analysis
  • Improve application performance by tuning memory footprint and optimizing Java collections and Java cache usage
  • Produce analysis plug-ins with capabilities specific to your application


Back to top


Features and benefits
Memory Analyzer is a powerful and flexible tool for analyzing Java heap memory using system dump or heap dump snapshots of a Java process. Memory Analyzer provides both high level understanding and analysis summaries using a number of standard reports. Memory Analyzer allows you to carry out in depth analysis through browsing and querying the Java objects present on the Java heap.
These features combine to make it possible to:
  • Diagnose memory leaks
    • Leak Suspects Report: Memory Analyzer provides a standard report that uses its in-built capabilities to look for probable leak suspects: large objects or collections of objects that contribute significantly to the Java heap usage, and displays information about those suspects: memory utilization, number of instances, total memory usage, and owning class.
    • Leak identification analysis: Memory Analyzer also provides a number of in-depth leak identification capabilities that look for collections with large numbers of entries, single large objects or groups of objects of the same class.
  • Analyse Application Footprint
    • Heapdump Overview Report: In order to provide a general understanding of the Java application being analysed, Memory Analyzer provides an overview report that provides information on the Java heap usage, system property settings, threads present, and a class histogram of the memory usage.
    • Top Consumers Report: Memory Analyzer also produces a top consumers report that gives a breakdown of the Java heap usage by largest objects and also which class loaders and classes are responsible for utilizing the most memory. This provides a high level insight into which J2EE application and/or code is contributing most to the overall memory footprint.
    • Component Report: Memory Analyzer can create reports outlining the top memory consumers and providing information on potential memory inefficiencies in any selected component.
    • Object tree browsing In addition to the report capabilities, Memory Analyzer provides the ability to browse the Java heap using a reference tree based view. This makes it possible to understand of the relationships between Java objects and to develop a greater understanding of the Java object interactions and the memory requirements of the application code.
  • Analyse Java Collection usage
    • Array and Collection Fill Ratio: Memory Analyzer allows you to understand the efficiency of object arrays and collections by informing you of the fill ratio: the ratio of used elements to the array or collection size. This shows how efficiently the collections are being used.
    • Map collision ratio: For map like collections that are keyed on object hash codes, Memory Analyzer provides an understanding of the collision ratio for those collections. Memory Analyzer will also show the key value pairs for these collections.
  • Automate custom analysis
    • Object Query Language (OQL): Memory Analyzer contains a SQL like query for running Java object and field level analysis of the Java heap, using classes as tables, objects as rows and field or attributes as columns. This makes it possible to generate reusable queries to locate certain objects or object collections of interest.
    • Create MAT plug-ins that use the MAT snapshot and the IBM DTFJ APIs: Memory Analyzer provides Eclipse extension points to produce custom reports against a Java API that provides representations of the Java heap, the data on the Java heap and the relationships between Java objects. In addition, Memory Analyzer also provides access to the IBM DTFJ API, giving access to all of the data available in the operating system dump.
Memory Analyzer is delivered in the IBM Support Assistant (ISA) Workbench. ISA is a free software offering which provides a single point of access for the IBM Monitoring and Diagnostic Tools for Java. When new versions of the tools become available ISA notifies you and helps you retrieve the latest version. Using ISA helps you troubleshoot and fix problems in your Java application.
You can expand the capabilities of Memory Analyzer using the IBM Extensions for Memory Analyzer from alphaWorks. The IBM extensions provide the ability to easily analyse the state of IBM software products, including the WebSphere Application Server
For example Figure 1 shows a Memory Analyzer session running in the IBM Support Assistant Workbench.
Figure 1. Memory Analyzer Overview view

Memory Analyzer Overview view



Back to top


System requirements
  • Memory Analyzer is installed within the IBM Support Assistant (ISA) Workbench.

  • Memory Analyzer supports the following dump types:
    • IBM Portable Heap Dump (PHD)
    • IBM Portable Heap Dump (gzipped)
    • IBM SDK for Java JExtracted System Dump
    • HPROF binary heap dumps
    From the following platforms:
    • AIX® PowerPC® 32 bit
    • AIX® PowerPC® 64 bit
    • zOS® 31 bit
    • zOS® 64 bit
    • Windows® x86 64 bit
    • Windows® x86 32 bit
    • Linux® x86 64 bit
    • Linux® x86 32 bit
    • Linux® PowerPC® 32 bit
    • Linux® PowerPC® 64 bit
    • Linux® s390 31 bit
    • Linux® s390 64 bit


Back to top


Installation
Memory Analyzer is installed within the IBM Support Assistant Workbench. To install Memory Analyzer follow the steps in the technote How to Install and Run Tools through the IBM Support Assistant. Whilst following the instructions in the technote please note that in the Tools Add-ons popup Memory Analyzer is listed under the 'JVM-based Tools' folder as 'IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer'
Additionally it is recommended that you increase the memory available to the ISA Workbench when running Memory Analyzer. To increase the available memory complete the following steps:
  1. Locate the rcpinstall.properties file in your ISA Workbench installation
  2. The rcpinstall.properties file resides in the following workspace location:
    For Windows: \IBM\ISAv41\.config\rcpinstall.properties
    For Linux: /ibm/isa41/.config/rcpinstall.properties
  3. Add or update the value for vmarg.Xmx property to 1280m
  4. For example: vmarg.Xmx=-Xmx1280m
  5. Restart the ISA Workbench for the change to take effect.


Back to top