Identify Potential Memory Leaks
Start monitoring memory usage patterns for custom memory structures. An object is automatically marked as a potentially leaking object when it shows a positive and steep growth slope. The Memory Leak dashboard provides the following information:
- Heap & Garbage Collection: Provides heap and garbage collection metrics.
- Automatic Leak Detection: Provides memory usage data for all map and collection libraries in a JVM session.
- Object Instance Tracking: Provides tracking data for the top 20 application and top 20 system (core Java) classes in the heap.
- Custom Memory Structures: Allows you to track specific classes and monitor a custom cache or other structure that is not a Java collection.
The Custom Memory Structures dashboard provides the following information:
-
- Class: The name of the class or collection being monitored.
- Deep Size (bytes): The upper boundary of memory available to the structure. The deep size is traced across JVM restarts
- % of Current Used Heap: The percentage of memory available for dynamic allocation.
- Potentially Leaking: Potentially leaking collections are marked as red. We recommend that you start a diagnostic session on potentially leaking objects.
- JVM Start Time: Custom Memory Structures are tracked across JVM restarts.
- Status: Indicates if a diagnostic session has been started on an object.
- Deep Size: A positive and steep growth slope indicates a potential memory leak.
After the potentially leaking collections are identified, start the diagnostic session.
Diagnose Memory Leaks
On the Custom Memory Structures dashboard, select the class name to monitor and click Drill Down.
Isolate Leaking Collections
Use Content Inspection to identify to which part of the application the collection belongs. It allows monitoring histograms of all the elements in a particular memory structure. Start a diagnostic session on the object and then follow these steps:
- Select the Content Inspection tab.
- Click Start Content Summary Capture Session.
- Enter the session duration. Allow at least 1-2 minutes for the data to generate.
- Click Refresh to retrieve the session data.
- Click a snapshot to view the details about that specific content summary capture session.
Access Tracking
Use Access Tracking to view the actual code paths and business transactions accessing the memory structure. Start a diagnostic session on the object and then follow these steps:
- Select the Access Tracking tab.
- Select Start Access Tracking Session.
- Enter the session duration. Allow at least 1-2 minutes for data generation.
- Click Refresh to retrieve the session data.
- Click a snapshot to view the details about that specific content summary capture session.