LOADING

Follow me

Go 1.9 的 GC 改善
十月 29, 2016|DCOSDockerGolangIT

Go 1.9 的 GC 改善

在「 Sub-millisecond GC pauses 」這邊看到的。 Golang 想辦法將 GC 造成的影響降低:「 Proposal: Eliminate STW stack re-scanning 」。

目標是解決最大的 GC pause 來源:

As of Go 1.7, the one remaining source of unbounded and potentially non-trivial stop-the-world (STW) time is stack re-scanning.

然後拿新的解法來戰,目前初步的測試看起來可以降到 50µs (== 0.05ms):

We propose to eliminate the need for stack re-scanning by switching to a hybrid write barrier that combines a Yuasa-style deletion write barrier [Yuasa ’90] and a Dijkstra-style insertion write barrier [Dijkstra ’78]. Preliminary experiments show that this can reduce worst-case STW time to under 50µs, and this approach may make it practical to eliminate STW mark termination altogether.

在「 runtime: eliminate stack rescanning · Issue #17503 · golang/go 」這邊可以看到進度,現在已經在 master branch 上了,看起來會在 1.9 的時候被放出來… 不過 worst case 的時間上修了 XDDD

The high level summary is that this reduces worst-case STW time to about 100 µs and typical 95%ile STW time to 50 µs (assuming, of course, that the OS doesn’t get in the way and that the system isn’t otherwise overloaded).

但看起來應該還是很大的效能改善,尤其是 CPU bound 的應用?

no comments
Share

发表评论