Tuesday, July 11, 2006

Memory Leaks in WebSphere

In their latest article titled "Memory leak detection and analysis in WebSphere Application Server", Indrajit Poddar and Robbie John Minshall discuss the techniques available in WebSphere Application Server 6.1 to address Java heap memory leaks. The following is a brief summary of the article:
There are four common categories of memory usage problems in Java:
  • Java heap memory leaks
  • Heap fragmentation
  • Insufficient memory resources
  • Native memory leaks
The common causes for Java heap memory leaks are:
  • Insertion without deletion into collections
  • Unbounded caches
  • Un-invoked listener methods
  • Infinite loops
  • Too many session objects
  • Poorly written custom data structures.
Memory usage problems due to insufficient memory resources can be caused by:
  • Configuration issues (allocating too little memory for heap).
  • System capacity issues(too little physical memory).
Native memory leaks are memory leaks in non-Java cod, for example:
  • Type-II JDBC drivers
  • fragmentation in the non-heap segment of the Java process's address space.
WebSphere Application Server and higher provides a two-stage solution for detection and analysis of memory leaks
  • In the first stage, a lightweight memory leak detection mechanism running within the production WebSphere Application Server uses inexpensive, universally available Java heap usage statistics to monitor memory usage trends, and provides early notification of memory leaks. An automated heap dump generation facility (available in WebSphere Application Server running on IBM JDKs)generates multiple heap dumps that have been coordinated with sufficient memory leakage to facilitate comparative analysis using MDD4J.
  • The second stagethe Memory Dump Diagnostic for Java (MDD4J) is used to analyze heap dumps outside the production application server.
More information in the article ...

1 comment:

Popular Posts