This article introduces the IBM® Extensions for Memory Analyzer for WebSphere® Enterprise Service Bus, which augments existing data structures in the IBM Monitoring and Diagnostic Tools for Java™ -- Memory Analyzer, and provides detailed reports pertaining to different aspects of the WebSphere ESB solution. The product-specific extension to Memory Analyzer significantly improves the effectiveness and efficiency of problem diagnosis and resolution, and provides a deeper understanding of your WebSphere ESB deployment.
Operating system level and portable heap dumps
A running IBM JVM enables you to produce different types of diagnostic data when different events occur. This article concentrates on the analysis of two types of dumps that you can generate:
- Heap dump
- A Heap dump is a dump of all live objects on the Java heap. The dump is stored in a Portable Heap Dump (PHD) file, which is a compressed binary format. A heap dump provides a snapshot of the memory of a running Java process, including details of classes, objects, Garbage Collector roots, and thread stacks. It shows objects that are using large amounts of memory on the Java heap, and shows what is preventing them from being collected by the Garbage Collector.
- System dump
- A System dump is a platform-specific file that contains information about active processes, threads, and the system memory. A system dump contains additional information
not present in a heap dump -- such as field names, field values, and the contents of primitive arrays. To use Memory Analyzer with a system dump, you must first use the jextract utility,
which obtains platform-specific information -- such as word size, endianness, data structure layouts, and symbolic information -- and puts this information into an XML file.
The jextract utility may also collect other useful files and compress all of them, along with the system dump, into a single ZIP file for use in subsequent problem diagnosis.
System dumps are typically large, and generating this diagnosis data can have significant processing overhead compared to generating a heap dump. However, IEMA for WebSphere ESB leverages the additional information contained within a system dump, which is often key to the problem diagnosis and resolution. Therefore it is recommended that you generate a system dump and use the jextract utility for problem diagnosis.
There are several ways to acquire a heap dump or system dump:
Using Ctrl-Break or SIGQUIT
When a Ctrl-Break or SIGQUIT (kill -3) is sent to the IBM JVM, it generates a user event in the IBM dump engine. You can configure the event using command-line options to generate either a system dump
-Xdump:system:events=user) or a heap dump (
Using the operating system (system dump only)
- AIX --
gencore (or destructive kill -[6|11])
- Linux/Solaris --
gcore (or destructive kill -[6|11])
- Windows --
- z/OS --
Using IBM Monitoring and Diagnostics Tools for Java -- Health Center
The Health Center provides a menu option to request either a system dump or heap dump from a running Java process.
Using the wsadmin utility
The wsadmin utility provides an API that supports system dump and heap dump generation. Use the following commands to acquire the appropriate diagnosis data:
wsadmin> Set objectName [$AdminControl queryNames WebSphere:types=JVM, process=<servername>,node=<node>,*] wsadmin> $AdminControl invoke $objectName generate<Heap|System>Dump
IBM Monitoring and Diagnostic Tools for Java -- Memory Analyzer
Memory Analyzer builds on the diagnostics capabilities of the Eclipse Memory Analyzer Tool to enable proficient Java heap analysis for the IBM Virtual Machines for Java. The Diagnostic Tool Framework for Java is used to implement the extended function, which enables you to:
- Diagnose and resolve memory leaks involving the Java heap.
- Derive architectural understanding of the 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.
It is the final point that enables IEMA for WebSphere ESB to provide the product-specific extensions. Memory Analyzer exposes a number of extension points to extend the base functionality, and two of these are used for IEMA for WebSphere ESB to extract and present product specific-data. The two extension points that IEMA for WebSphere ESB uses are:
- Used for detailed analysis or exploring dumps. It provides a report contained within Memory Analyzer that can involve tables, charts, histograms, and free text. This extension point also enables integration of the query report into the menu system of Memory Analyzer.
- Used to provide meaningful descriptions of objects through augmentation of existing data structures.
IBM Extensions for Memory Analyzer for WebSphere ESB
IEMA for WebSphere ESB provides product-specific extensions to Memory Analyzer that build on product knowledge to augment existing data structures and provide detailed reports on different aspects of the WebSphere ESB solution. This section outlines the available function explains how to use the data for effective and efficient problem analysis and resolution. While this article covers all functions, analysis of heap dumps only provides a subset of the available functions.
Problem determination and resolution
IEMA for WebSphere ESB delivers new product-specific function by using two extension points exposed in the underlying technology. The simplest are the Name Resolvers that use the org.eclipse.mat.api.nameResolver extension point in Memory Analyzer. The table below shows the objects for which a Name Resolver is available and the augmentation provided:
Table 1. Available Name Resolver augmentations
|Mediation Primitives||Display name for the Mediation Primitive. The XSLTMediationPrimitive and BOMapperMediationPrimitive contain additional data relating to the transformation map being used. The FanInMediationPrimitive and FanOutMediaitonPrimitive also contain information on the mode in which they are functioning.|
|JavaMediationPrimitive||Type of MediationPrimitive that it is wrapping|
|LightWeightFlowRegistry||Size of registry|
|ManagedExportImpl||Display name of export|
|ManagedImportImpl||Display name of import|
|ManagedModuleImpl||Name of managed module|
|SCAModulePropertyImpl||Name and value of SCA module property|
|SIBXMediationFlow||Name of associated module.|
|SIBXMediationFlowComponentImpl||Name of component and associated module|
|SIBXMediationFlowComponentPool||Size of pool|
The augmentation of existing data structures with the information defined provides a simple tool to identify associations between objects. Augmentation is a powerful tool for fast and effective problem analysis, enabling you to quickly identify the source of a problem and relate it to known resources in the development environment.
The second extension point that IEMA for WebSphere ESB uses is org.eclipse.mat.report.query, which provides a number of queries accessible through the Open Query Browser menu, as shown below:
Figure 1. Query Menu
The available queries are detailed below.
WebSphere ESB Overview
The WebSphere ESB Overview query provides detailed information on the environment in which WebSphere ESB is installed, including information about the product itself, such as installation versions, build revisions, and installation directories. It provides a convenient summary of the installation, and specifies code levels for the WebSphere ESB solution. The query also provides information about the server configuration, as well as the installed applications containing a Mediation Flow Component (MFC). This information helps with analysis of the solution architecture.
The WebSphere ESB Overview also contains the pie chart shown below, which shows the percentage of the Java heap used by WebSphere ESB. The percentage is calculated at the class loader level and enables you to quickly identify memory issues with any classes and object instances related to WebSphere ESB.
Figure 2. The WebSphere ESB Overview -- Heap utilisation
The final information provided is a subset of the Java command-line arguments, which give you an understanding of how the Java heap has been tuned. The subset is restricted to those options with the -X prefix, which encapsulates such detail as the minimum and maximum heap settings, and information on Garbage Collector policy.
The WebSphere ESB Overview provides a sound starting point for analysis, identifying any obvious issues with the configuration or architecture and any WebSphere ESB-specific memory issues.
WebSphere ESB Statistics
The WebSphere ESB Statistics query presents detailed information on a number of objects and resources in the WebSphere ESB run time, such as details on specific thread pools, and SCAModuleProperty and JavaMediationPrimitive objects. This query helps you identify issues related to mediation flow design, thread pool tuning, and administration.
WebSphere ESB Mediation Flows
The WebSphere ESB Mediation Flows query presents detailed information on the mediation flows within the dump, including the used and retained heap of all flows within a component, and the mediation flow logic detail. The logic detail is depicted in a hierarchical structure, with additional information on the associated display names of the mediation primitives provided as tool tips when you mouse over them. When a mediation primitive has multiple input connections, a reference is provided in the structure to the first occurrence of that sub-tree.
The WebSphere ESB Mediation Flows query gives you a sound understanding of the deployed applications and the logic that they are designed to execute. It also helps you identify mediation flows that have unexpected memory use, and shows workload balance via a count of the number of instances of a particular SIBXMediationFlow on the Java heap. Here is an example report generated from the WebSphere ESB Mediation Flows query:
Figure 3. WebSphere ESB Mediation Flows query
WebSphere ESB Mediation Primitives
The WebSphere ESB Mediation Primitives query presents information on the mediation primitives in the dump. The number of object instances and their associated head sizes are shown in the table, including all custom mediation primitives you have created. If the retained heap of a particular type of mediation primitive exceeds 5% of the available heap then that mediation primitive is highlighted, enabling a more targeted analysis of the Java heap and the WebSphere ESB applications deployed.
WebSphere ESB Mediation Flow Design
The WebSphere ESB Mediation Flow Design query provides recommendations for changes to the design of deployed mediation modules based on analysis of the contents of the dump. The query identifies two possible areas for performance improvements:
- Chained XSLTMediationPrimitives
- The query identifies mediation modules that contain XSLTMediationPrimitives that are chained together. Combining the transformations into a single XSLTMediationPrimitve will improve performance.
- Use of mapping technologies
- The query identifies XSLTMediationPrimitives that perform a transformation on the root of the Service Message Object (SMO). The alternative mapping technology in the development environment is implemented in the BOMapperMediationPrimitive, which improves performance compared to the XSLTMediationPrimitive when transforming on the root of the SMO.
WebSphere ESB Applications
The WebSphere ESB Applications query presents detailed information on the applications installed on the server that contain an MFC. The name of each identified application is displayed with library dependencies, defined parsing runtime, imports, exports, and components. Additional information is provided on the imports, exports, and components themselves, such as name, associated resources, and endpoints. This query helps you understand the deployed applications and their configuration, integration, and communications. Here is an example report generated from the WebSphere ESB Applications query:
Figure 4. WebSphere ESB Applications query
IBM Extensions for Memory Analyzer for WebSphere ESB is a powerful tool that enables effective and efficient determination and resolution of memory problems, and provides a deeper understanding of the WebSphere ESB solution
- WebSphere ESB and related resources
- IBM Support Assistant
A complimentary offering which provides you with a workbench to help you with problem determination.
- WebSphere Enterprise Service Bus Library
Reference documents, publications and resources for WebSphere Enterprise Service Bus.
- IBM Extensions for Memory Analyzer
Capabilities for debugging generic Java applications and specific IBM software products.
- WebSphere ESB information center
A single Web portal to all WebSphere ESB documentation, with conceptual, task, and reference information on installing, configuring, and using WebSphere ESB.
- WebSphere ESB developer resources page
Technical resources to help you use WebSphere ESB as a flexible connectivity infrastructure for integrating applications and services to support an SOA.
- WebSphere ESB Development Guide
The Development Guide manual in PDF format.
- WebSphere ESB product page
Product descriptions, product news, training information, support information, and more.
- WebSphere ESB documentation library
WebSphere ESB product manuals.
- WebSphere ESB FAQs
Common questions about WebSphere ESB and its relationship to other ESB products.
- WebSphere ESB support
A searchable database of support problems and their solutions, plus downloads, fixes, and problem tracking.
- IBM Support Assistant
- WebSphere resources
- developerWorks WebSphere developer resources
Technical information and resources for developers who use WebSphere products. developerWorks WebSphere provides product downloads, how-to information, support resources, and a free technical library of more than 2000 technical articles, tutorials, best practices, IBM Redbooks, and online product manuals.
- developerWorks WebSphere application integration developer resources
How-to articles, downloads, tutorials, education, product info, and other resources to help you build WebSphere application integration and business integration solutions.
- developerWorks WebSphere business process management developer resources
WebSphere BPM how-to articles, downloads, tutorials, education, product info, and other resources to help you model, assemble, deploy, and manage business processes.
- Most popular WebSphere trial downloads
No-charge trial downloads for key WebSphere products.
- WebSphere forums
Product-specific forums where you can get answers to your technical questions and share your expertise with other WebSphere users.
- WebSphere on-demand demos
Download and watch these self-running demos, and learn how WebSphere products and technologies can help your company respond to the rapidly changing and increasingly complex business environment.
- developerWorks WebSphere weekly newsletter
The developerWorks newsletter gives you the latest articles and information only on those topics that interest you. In addition to WebSphere, you can select from Java, Linux, Open source, Rational, SOA, Web services, and other topics. Subscribe now and design your custom mailing.
- WebSphere-related books from IBM Press
Convenient online ordering through Barnes & Noble.
- WebSphere-related events
Conferences, trade shows, Webcasts, and other events around the world of interest to WebSphere developers.
- developerWorks WebSphere developer resources
- developerWorks resources
- Trial downloads for IBM software products
No-charge trial downloads for selected IBM® DB2®, Lotus®, Rational®, Tivoli®, and WebSphere® products.
- developerWorks blogs
Join a conversation with developerWorks users and authors, and IBM editors and developers.
- developerWorks cloud computing resources
Access the IBM or Amazon EC2 cloud, test an IBM cloud computing product in a sandbox, see demos of cloud computing products and services, read cloud articles, and access other cloud resources.
- developerWorks tech briefings
Free technical sessions by IBM experts to accelerate your learning curve and help you succeed in your most challenging software projects. Sessions range from one-hour virtual briefings to half-day and full-day live sessions in cities worldwide.
- developerWorks podcasts
Listen to interesting and offbeat interviews and discussions with software innovators.
- developerWorks on Twitter
Check out recent Twitter messages and URLs.
- IBM Education Assistant
A collection of multimedia educational modules that will help you better understand IBM software products and use them more effectively to meet your business requirements.
- Trial downloads for IBM software products
Dig deeper into WebSphere on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.