ZGC: A Scalable Low-Latency Garbage Collector [video]
youtube.com
youtube.com
The upshot of that is that you probably don't want to swap to this unless you use a relatively large heap (at least 32 GB, maybe more), because below that level the STW latency of the other GC options aren't generally speaking bad enough to be worth the trade-off.
Also if latency is a big concern for you and you've got dollars to spend consider Azul zing as well. (That part isn’t from the talk.)
Doesn’t C4 still use a thread-local bump allocator? How does that increase allocation time?
I would think it’s much more likely to be the complex barriers.
https://cr.openjdk.java.net/~pliden/slides/ZGC-Jfokus-2018.p...
I assume this relates to this conversation? This is a bit of a snippet from a broader discussion (which I found really interesting). Maybe there were other discussions here about GC that I missed.
I would like to respond here, not because I want to continue some heated debate, but because questions of garbage collectors and the _many_ decisions and trade-offs available are very interesting. And they deserve a good treatment.
I don't think it's really fair to characterise pcwalton's position in this way. I think that his comments on Go's GC were quite reasonable and well informed.
Go (which I think (and maybe mistakenly) is the real subject of the parent comment) _does_ have a very innefficient GC right now. But that could be changing in a near-future. Some people are experimenting with adding generations to Go garbage collector. It's not clear how long this will take to accomplish. In addition to the problem of 'building a generational GC that is low latency' there are lots of parts of the runtime which currently rely on memory allocations not moving. So there's a lot of ordinary engineering work to be done to ensure that _everything_ works with a generational GC.
So in this respect Go may soon 'learn from hotspot'.
In order to avoid anyone thinking that I am anti-Go. I am a full time Go programmer. I really like Go, and I think the decision to prioritise latency over throughput was the right choice. But, there is a lot that can be improved in the current GC. I spend a fair bit of my time trying to manage it during they day.
Anyway, it feels a bit sad to see this super super fun topic turn into some kind of grudge. If pcwalton has thoughts on ZGC I would be keen to hear them.
Absolutely agree.
To add a little more context, the frustrations were that his comments were repetitive and the threads didn't go anywhere and generally distracted from more productive conversations. Minor nuissance, and it's been a while since he's posted more of those comments (at least I haven't seen them in a while), so we should get off his back (not all of my comments have been solid gold either). He's a knowledgable person and has a lot to offer me and this community generally.
Hopefully we can all move past this and be a little more gracious and tactful with each other, because you're right--this is a really interesting, fun topic.
https://words.steveklabnik.com/borrow-checking-escape-analys...
:)