News for hackers. Stuff that matters.
Re:Go, don't collect my garbage by lmm on Monday November 13, 2017 @08:34AM (#15686394)
It's a simple problem with a simple fix, from a very simple benchmark - but it's already reaching the limits of how much tuning Go offers. If even such a basic benchmark needed one GC tuning knob, that seems suggestive that maybe a larger and more complex program really would need all the knobs that Java offers, the ones that Go claims are unnecessary.

Or maybe not - maybe that one knob really can solve all the problems. But I really was surprised that anyone would ever need to actively configure a GC for such a simple use case, so I've learnt something at least.

Re:Go, don't collect my garbage by deong on Monday November 13, 2017 @10:14AM (#15686986)
If you need the machinery Java has, you're already fucked. To a first approximation, no one knows how to tune a JVM. Whole books have been written multiple times on the subject, and everywhere I've been that used large-scale Java applications, tuning failures are still at or near the top of the list of most common production issues.

We don't appear to be much better off than we were with C. I guess the server melting is probably preferable to an exploitable smashed stack, but prevention of both issues appears to be to hire geniuses who don't make mistakes while doing enormously mistake-prone work.

Re:Go, don't collect my garbage by lmm on Monday November 13, 2017 @12:49PM (#15688329)
> We don't appear to be much better off than we were with C. I guess the server melting is probably preferable to an exploitable smashed stack, but prevention of both issues appears to be to hire geniuses who don't make mistakes while doing enormously mistake-prone work.

"Everyone gets correctness, you need geniuses to get maximum performance" is a huge improvement over the reverse.

Re:Go, don't collect my garbage by deong on Tuesday November 14, 2017 @01:16PM (#15697632)
Except I see tons of outages caused by things like VM and application server tuning. Software that isn't working isn't correct or performing well.
Re:Go, don't collect my garbage by lmm on Wednesday November 15, 2017 @11:40AM (#15705067)
Not running at all, while not ideal, is a lot better than silent data corruption.
Re:Go, don't collect my garbage by stmw on Monday November 13, 2017 @09:57AM (#15686872)
"more complex program really would need all the knobs that Java offers, the ones that Go claims are unnecessary." - but that is really a move in the wrong direction... it's meta programming with Env variables, allocation sizes, command lines, and JDK versions. Sure, Go will probably eventually have all that, to support more tuning, but at that point, ti feels the war for "simple, predictable, low-overhead GC" has been lost, yet again.
Re:Go, don't collect my garbage by lmm on Monday November 13, 2017 @10:36AM (#15687172)
> Sure, Go will probably eventually have all that, to support more tuning, but at that point, ti feels the war for "simple, predictable, low-overhead GC" has been lost, yet again.

Well, it seems we don't have a simple GC that performs well in all cases, and really why would we expect to? So choosing simplicity means leaving performance on the table, at least for now, and while there are languages that do that (Python) it doesn't seem like a good fit for Go.

Re:Go, don't collect my garbage by stmw on Monday November 13, 2017 @10:55AM (#15687328)
> "it seems we don't have a simple GC that performs well in all cases" Exactly, and after 20+ years, it may be that it's not possible to have such a GC.
Re:Go, don't collect my garbage by weberc2 on Monday November 13, 2017 @08:41AM (#15686444)
I think most pathological cases can be reduced to similarly simple examples. I'm sure these exist for other GCs as well.
Re:Go, don't collect my garbage by stmw on Monday November 13, 2017 @11:35AM (#15687680)
Yes, the take-away here is not that Go is particularly bad, but that GCs are problematic. Notably, GC != automatic memory management.
Re:Go, don't collect my garbage by weberc2 on Monday November 13, 2017 @04:49PM (#15690580)
That's not a reasonable conclusion to draw. You would need to preallocate to maximize performance regardless of GC in this case, and in other cases, the performance and determinism gaps between GC languages and non-GC languages is almost entirely due to tertiary factors. For example, GC languages are more likely to prioritize friendliness over raw performance in other areas--language features, compiler optimizations, standard library design, etc. Non-GC languages really only need to appeal to the high-performance and high-determinism crowds.
Re:Go, don't collect my garbage by littlestymaar on Monday November 13, 2017 @02:33PM (#15689418)
> Notably, GC != automatic memory management.

Actually, GC == automatic memory management, just not automatic performant memory management