6 ms·
I really hope this doesn't become a meme. Pause time is only one metric that's relevant when looking at GC, another very important one is throughput. In fact
by mike_hearn 11y ago
I really hope this doesn't become a meme.
Pause time is only one metric that's relevant when looking at GC, another very important one is throughput.
In fact you can get very low (10-50 msec) pause times with the latest JVMs even with very large heaps, you can just request it at the command line, but you'll pay for it with slower execution. There is always a tradeoff. Go doesn't have anything fundamentally new in this field.
There is a report here on an adapted HotSpot (not integrated into the mainline JVM though) that gives <10msec pause times at the 99th percentile and an 8 gigabyte heap:
http://welf.se/files/OL15.pdf
But you pay for it with a 15% CPU overhead.
Go's GC seems to actually do a full concurrent mark/sweep of the entire heap every single time. That suggests to me that throughput could be rather poor.
- pcwalton 11y ago> Go's GC seems to actually do a full concurrent mark/sweep of the entire heap every single time. That suggests to me that throughput could be rather poor. Not to mention that you lose bump allocation in the nursery. Nongenerational GC is a lose-lose all around.
- jlouis 11y agoRight, scanning large heaps means someone has to pay along the way. The Go GC pays with lowered throughput much like the adapted HotSpot VM is showing. The 10ms pause times for go were reported for a 250 gigabyte heap, however, and that is pretty amazing. But the lowered throughput has to be present as you are scanning the heap and you have enabled the write barrier to make the concurrent scanning work its invariants. In fact, the newest versions will make aggresively allocating goroutines run slower by using some of their timeslot when they request data do run the mark phase.