3 ms·
Go has no proper solution to garbage collector ballast, a hack which businesses you've heard of are using in the wild. see https://blog.twitch.tv/en/2019/04/10/
by correct_horse 7y ago
Go has no proper solution to garbage collector ballast, a hack which businesses you've heard of are using in the wild. see https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i-learnt-to-stop-worrying-and-love-the-heap-26c2462549a2/ https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i... and https://github.com/golang/go/issues/23044 https://github.com/golang/go/issues/23044. A golang team member's reasons for not adding a minimum heap size include that it would require more testing each release, and that they might want to have a max heap size hint instead.
I posted a comment similar to this one recently, but it seems more relevant here.
- Groxx 7y agoI've noticed similar things while profiling my tests - making a large static allocation or bumping GOGC=1000 can cause them to run more than 2x faster (my favorite took a 12 second test suite and dropped it to about 2.5 seconds). So much time is spent assisting the GC to keep memory at like an 8-12mb range, as if that small of a heap was somehow the most important thing Go could be doing with the CPU.