2 ms·
> it will make stop-the-world's less frequent, while keeping their duration mostly unchanged (as that scales proportionally to live heap size). Go's STW phases
by morelisp 4y ago
> it will make stop-the-world's less frequent, while keeping their duration mostly unchanged (as that scales proportionally to live heap size).
Go's STW phases are mostly not proportional to live heap size; iirc one never is and the other is proportional to something variable but only weakly correlated with heap size (cleaning up cached spans).
It's hard to figure out what GP is describing exactly but I don't think GOGC alone would necessarily address that. If latency was still good it was probably not over-triggering STW nor dragging other threads into mark assist.
I think they may have been hitting the pathological case described where stack roots were not being counted so a little allocation with a lot of stack-heavy goroutines could get confused for a lot of allocation, trigger a CPU-intensive mark phase, but neither clean much real memory in absolute terms nor effectively count a larger live set after. Prior to 1.18, GOGC might have to be set dangerously large avoid that.