Critical Metrics for OOM Heap Analysis

Analyzing object retained sizes, instance counts by class, and GC roots helps pinpoint memory hogs and accurately diagnose OutOfMemory errors.

The top 3

  1. Top 3 Object Types Dominating OOM Heap Dumps: Identify the most frequent culprits like large collections (e.g., `ArrayList`, `HashMap`), unevicted caches, and massive `String` or array instances that consume the most memory, leading to `OutOfMemoryError`.
  2. Key Heap Metrics: Shallow vs. Retained Size: Distinguish between "Shallow Heap" (memory consumed by an object itself) and "Retained Heap" (total memory freed if an object and its exclusively held dependents are garbage collected), crucial for pinpointing true memory hogs.
  3. Top 3 Tools' Core Features for OOM Diagnostics: Compare the essential features of leading tools like Eclipse MAT (leak suspects, dominator tree, OQL), VisualVM (summary, classes, OQL console), and JProfiler (heap walker, allocation recording) for effective OOM heap dump analysis.

Sources

Open the full topic