A 40ms Go garbage collector pause caused by swap

shellpipe 40 points 11 comments October 05, 2026
frn.sh · View on Hacker News

Discussion Highlights (7 comments)

octoberfranklin

Yet another reason why "no runtime" is such a huge advantage.

pizlonator

Is there a reason why Go isn’t using on the fly GC, where there’s no STW at all?

truth_seeker

What is stopping the author to use latest version of Go and Linux Kernel ?

soltanov

A GC latency SLO should include operating-system memory pressure. Otherwise, a page-fault problem will look like a collector problem and lead to the wrong fix.

jacobgold

"It hurts when I do this" "Stop doing that" If you care about latency, disable swap. System wide or for the specific the cgroup.

ahmedmostafa16

The nasty bit is that swap doesn't just make the allocation slower; if GC metadata gets paged out, you have turned memory pressure into a stop-the-world latency spike.

raverbashing

I don't get why people do not prefer reference counting, it has more predictable runtime performance (though of course a swap is a swap - but you can "trigger" it depending on your memory or file access pattern)

Semantic search powered by Rivestack pgvector
8,480 stories · 79,262 chunks indexed