by staticassertion · 4y ago · 0 comments
https://eng.uber.com/jvm-tuning-garbage-collection/
Here's another blog from Uber on JVM tuning.
Some notes:
1. They have options
2. They have a powerful gc log, no need to roll your own finalizer thing like this
3. Choosing the max heap size, which seems like what they actually wanted here, is trivial
You could say "but that's more complex", but to me it's that the JVM has far more mature features, tons of tooling and options that they could explore and adopt, and that the obvious wins are trivial to achieve through basic parameter tuning.
Further, this GOGC parameter seems to be a very weird knob. The knobs you'd run into with the JVM will often be a lot more straightforward ie: a static value for heap size vs some number that's based on a working set percentage.
I wonder if over time Go will end up with a tunable GC.
With Go there's one parameter, and in my opinion it's a very strange one. It also seems strange to have to (imo) hack GC metrics in using finalizers, whereas with the JVM it's simply provided to you.
Full disclosure though, I think Go is a bad language, so I'm biased.
It’s weirdly black and white to assume that just because someone thinks a language is “bad”, that opinion doesn’t have nuance.
Full disclosure, I also think go is a bad language ¯\_(ツ)_/¯
I could talk a lot about why I think it's a bad language, it would be hard to summarize it since I'd want to cite Pike's talks on "simplicity", articles on Go's GC implementation, discuss error handling, what I think makes a language "good", etc.
The "debate" is usually between people who have committed to either path (creating tools or learning tools) and think that just because the marginal cost of my approach, for me is 0, it must be 0 for everyone else. Which is patently false.