News for hackers. Stuff that matters.
Re:GC Fun at Twitch by dwohnitmok on Friday November 15, 2019 @08:15PM (#21550288)
It's interesting to see how other GCs try to handle this. In particular the JVM's (awesome) new Shenandoah low-latency GC has a ShenandoahAllocSpikeFactor option precisely to deal with this kind of situation, where you can specify what percentage of the heap you're willing to sacrifice in a spike in allocation rates before the GC starts running wild trying to collect garbage.

The trade-off of the knob-less approach of Go's GC I suppose.

Re:GC Fun at Twitch by apta on Friday November 15, 2019 @10:53PM (#21550900)
The JVM offers state of the art GCs, which allows for selecting the best tool for the job (throughput, latency, large heaps, etc.).

This is unlike the golang gc, which is tuned for latency at the expense of throughput, with no way of modifying its behavior without resorting to hacks like the article in the post.

Re:GC Fun at Twitch by dwohnitmok on Saturday November 16, 2019 @12:02AM (#21551107)
To Go's credit, it predates Shenandoah and ZGC, before which your only real option for low-latency GC on the JVM was Zing, which I don't think had too many people using it (I certainly have no personal experience with it). I can't say whether they were inspired by Go, but I do think that Go is responsible for bringing the desirability of low-latency GC, even at potentially high cost to throughput, to the forefront of the greater programming community's attention.
Re:GC Fun at Twitch by pjmlp on Saturday November 16, 2019 @05:52AM (#21552006)
They could offer other ways to manage memory manually instead of just escape analysis, like GC enabled systems languages, but that is not the nature of Go's design.
Re:GC Fun at Twitch by astral303 on Saturday November 16, 2019 @11:16AM (#21553346)
Do you not consider G1 a low latency GC?
Re:GC Fun at Twitch by dwohnitmok on Saturday November 16, 2019 @12:38PM (#21553823)
When considering latency, it's still not in the same league as Shenandoah and ZGC. We still had occasional GC times over a second with G1 on some production systems several years ago IIRC.
Re:GC Fun at Twitch by tus88 on Saturday November 16, 2019 @07:22AM (#21552301)
Except when the best tool for the job is a language without GC at all.
Re:GC Fun at Twitch by Thaxll on Saturday November 16, 2019 @01:08AM (#21551292)
Yes you can modify GC behaviour and it's one env variable, the fact that twitch didn't use it makes no sense.
Re:GC Fun at Twitch by MaulingMonkey on Saturday November 16, 2019 @03:37AM (#21551640)
The original blog post[1] does mention GOGC, and a list of pitfalls that made them prefer ballast / the pending heap size proposal[2] over it. Are they in error? Or do you find their reasoning unconvincing?

[1] https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i...

[2] https://github.com/golang/go/issues/23044