The Key to Go Efficiency is Just a Few Go Runtime Metrics Away!
summary
Go Runtime exposes concrete metrics that let developers find real problems fast: use the new runtime/metrics package (Go 1.16+) and Prometheus client_golang to scrape the recommended ~10 runtime metrics. Example: one instance shows 30,000 goroutines and ~1,000,000 allocated objects, causing GC pauses five times worse; root cause is uncancelled context in a loop (fix: cancel, don’t defer in the loop). Monitor GOMAXPROCS, GOGC, GOMEMLIMIT, goroutine counts, heap_alloc and alloc_total to detect leaks and tune tradeoffs.
AI-written summary · about
chapters (5)
- 0:00Go runtime metrics intro
- 7:27Why monitor Go runtime metrics
- 15:40Collecting metrics with Prometheus
- 28:43Key Go runtime metrics
- 49:44Key takeaways and Q&A
related talks
31mThe Key To Go Efficiency Is Just a Few Prometheus Metrics Away!
44mGo Profiling and Observability from Scratch
34mGolang: Specific Performance Issues
21mReaching the ceiling of single-instance Go
30mMemory Management in Go: The good, the bad and the ugly
50mUnderstanding the Go runtime
40mTwo Go programs, three different profiling techniques, all in 40 minutes
35mGoroutines: the dark side of the runtime
