← Files Go: Production EngineeringARCHIVED FILE

skills/go-performance-and-diagnostics/references/diagnostic-tree.md

655 Bytes · Oct 3, 2026 · 06:33 UTC

↓ Download file

# Diagnostic tree

- High CPU with stable throughput: CPU profile, algorithmic work, serialization, runtime overhead.
- Rising RSS: heap in-use profile, goroutine stacks, caches, buffers, mmap, cgo, and retained references.
- High allocations/GC: allocation profile and object lifetime before pooling.
- Tail latency only under load: queueing, contention, downstream capacity, GC pauses, and retry amplification.
- Low CPU and low throughput: block/mutex profiles, goroutine dump, network/database waits, admission limits.

Microbenchmarks must exclude irrelevant setup, prevent compiler elimination, control parallelism, and compare identical semantics.

SHA-256: e3efa3163ed0dd9cbb4b6eb02cff962d6eed2c96c08d9ca4cf6617b882fc5e37