Go Faster: Tuning the Go Runtime for Latency and Throughput
summary
ShareChat tunes Go runtime across hundreds of services on thousands of cores and reports concrete wins: setting GOMAXPROCS correctly cuts cost up to 30% by reducing scheduling delays, GC can consume >40% CPU on bad heaps, and tuning GOGC, GOMEMLIMIT yields ~5% CPU and similar P99 latency reductions on average. Continuous profiling with runtime/metrics and pprof feeds profile-guided optimization (up to ~14% on compute-bound paths). Go 1.25 adds container-aware GOMAXPROCS and experimental GC improvements that further lower overhead.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:08Go runtime overview
- 2:33Go scheduler deep dive
- 5:03Garbage collector basics
- 6:27Observability with metrics
- 7:52Profiling for bottlenecks
- 10:23Memory management tips
- 11:25Runtime tuning with GOMAXPROCS
- 12:48Tuning garbage collector
- 15:16Profile guided optimization
- 15:57Real-world optimization results
- 19:11Latest Go runtime improvements
- 19:31Summary and key takeaways
