Reading memory graphs
Production and local charts tell stories. Learn two shapes:
Healthy: sawtooth
Section titled “Healthy: sawtooth”Memory rises during work, drops after GC, returns near baseline.
xychart-beta title "Healthy sawtooth" x-axis [t1, t2, t3, t4, t5, t6, t7, t8] y-axis "Heap MB" 0 --> 50 line [20, 35, 22, 38, 24, 36, 23, 37]
Leaking: staircase
Section titled “Leaking: staircase”Each cycle’s trough is higher than the last — GC cannot reclaim leaked objects.
xychart-beta title "Leak staircase" x-axis [t1, t2, t3, t4, t5, t6, t7, t8] y-axis "Heap MB" 0 --> 80 line [20, 32, 38, 48, 55, 62, 70, 78]
How to validate
Section titled “How to validate”- Steady synthetic load (same endpoint, same UI loop)
- Mark deploy times on chart
- Compare 7-day trend vs 24-hour noise
- Correlate with traffic — leak persists at constant RPS
False positives
Section titled “False positives”| Pattern | Explanation |
|---|---|
| Step up after deploy | New code caches warmup — may be OK |
| Slow climb then flat | Cache reached steady state |
| Spike at cron time | Batch job — not necessarily leak |