Memory troubleshooting guide
(Coming from this incident: production#2581 (closed))
Diagnosing memory issues is notoriously hard. There are several methods that can be used, and they are largely dependent on the type of process being profiled.
It would be good to have a guide that goes into how to diagnose high memory usage.
It may make sense to have separate guides per process type.
- Go: We have pprof and potentially even continuous profiling.
- Ruby: Stackprof, heap dump via objspace. GC stats. jemalloc stats.
- Generic: pmap, smaps, core dump, heap dump via gdb.
- Novel: heaptrack, tcmalloc, poireau.
Some of these need some more work on the tooling side on our end. But at the very least pprof and continuous profiling would be good to document.
refs &84
Edited by Alberto Ramos