3 ms·
Just as another data-point, java now has ZGC and Shenandoah low-latency GCs that basically sacrifice some throughput for better latency (read barriers instead o
by kaba0 5y ago
Just as another data-point, java now has ZGC and Shenandoah low-latency GCs that basically sacrifice some throughput for better latency (read barriers instead of write), but the former can already achieve <1 ms global pauses, which is shorter than what the OS scheduler itself can cause. Of course one should never “spam” the GC needlessly, but it does work for up to quite big heap sizes.
- bob1029 5y agoZGC is a very compelling option for applications that get periodic restart opportunities (or are of the cruise missile guidance computer variety). In places where you have to use reference types, sometimes you can allocate everything you should ever need up-front and then pull from that pool of pinned instances throughout the day. Pre-allocating all of your required memory can provide more deterministic outcomes.