Hacker News new | comments | show | ask | jobs | submit login

It looks like a few things in there could further reduce typical and peak pause times, by backgrounding more phases of the work and rescanning stacks late so it's less likely much marking has to happen in the pause. I'm less clear on this, but "embrace write barrier during scan" and the other pacing changes might also better spread out work during the concurrent phases.

The pause improvements in 1.5 are no joke -- here's a benchmark from the GopherCon talk on it: http://i.stack.imgur.com/4TOux.png (1.5 is the yellow dots along the bottom)

(That talk is https://www.youtube.com/watch?v=aiv1JOfMjm0 and the slides are https://talks.golang.org/2015/go-gc.pdf )

And here's a graph from a real-world memory hungry app on a beta--300ms pause down to 4ms: https://twitter.com/mkevac/status/620872308446625792/photo/1

(Presentation on that app here: http://www.slideshare.net/MarkoKevac/markogoinbadoo )

Another app's pauses went from ~12ms to ~2ms: https://twitter.com/inconshreveable/status/62065078666255564...

And this doc means Go isn't moving to a generational GC now, which the pre-1.4 proposal speculated they might do in 1.6. That would mostly be a throughput win (discard short-lived garbage cheaply and early, so full GCs can be rarer), not a pause win (it could add new short pauses for young-gen GCs). Seems sane for now, since the polish they're talking about seems difficult, directly useful, and important as a basis for future work, and the pauses seem like the larger headache for the working Gopher anyway.




I've wondered for a while how much go could benefit from better escape analysis. Especially if they don't do generational.

Intuitively, it seems quite some escapes are only returned to the caller, then lost. If the compiler rewrote those functions as operating on references to caller provided memory (on the stack), it could reduce transient garbage.


So, watching https://twitter.com/golang_cls, some escape-analysis and general garbage-prevention stuff landed (much from, or with the involvement of, the always-amazing Dmitry Vyukov).

Maps don't always escape now, for example: https://go-review.googlesource.com/#/c/3508/

Code was added to recognize that some ops don't cause escaping: https://go-review.googlesource.com/#/c/3031/ https://go-review.googlesource.com/#/c/8201/ https://go-review.googlesource.com/#/c/3162/

dvyukov wrote about some potential improvements and linked to issues in Feb: https://docs.google.com/document/d/1CxgUBPlx9iJzkz9JWkb6tIpT...

I think I saw even string bytes can be stack-allocated sometimes now, but couldn't immediately find the CL.

It looks like this is one of those things where one just has to chip away at cases. Movement happening; just a ton of round tuits required.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: