A 40ms Go garbage collector pause caused by swap
Fernando Simões A 40ms Go GC pause caused by swap Sep 13, 2026 I’m writing this so you don’t slap your forehead like I almost did when I decided to run swap in production to absorb memory spikes. I had a cgroup with two processes: one is a Go process that calls io.ReadAll and then proto.Unmarshal, creating a blob and then a graph struct (which is marked as scan by Go’s allocator). The other process is an HTTP server that mostly stays quiet. Whenever the collector runs, it reads
Read full article →