3 ms·
Looking at that, why isn't ZGC the standard GC in Java 17?
by gregaccount 5y ago
Looking at that, why isn't ZGC the standard GC in Java 17?
- __s 5y agoOnly stabilized in Java 15
- kaba0 5y agoLatency and throughput are fundamentally opposite ends of the same axis. And perhaps the majority of Java applications prefer better throughput.
- twic 5y agoBut the graph in the article shows that ZGC now gets better throughput than G1! [EDIT no it doesn't] I suspect the answer is that ZGC is not considered mature enough, and has a higher memory overhead than G1.
- dralley 5y agoThere are also other GCs that are heavily competitive with ZGC, such as Shenandoah. It might make sense to see how they all pan out before choosing a new default.
- Sindisil 5y agoShenandoah isn't an Oracle maintained feature, so they'll never allow it to become the OpenJDK default (though another vendor make it so in their distribution).
- cpitman 5y agoNo, that graph may be hard to understand. It shows the relative improvement each GC has made since Java 8, not the absolute performance.
- twic 5y agoAh, i realised it was relative, but i had assumed they were all relative to the same baseline! Should have been obvious from the way the bars are all level for JDK 8, really. That seems a needlessly unhelpful graph.
- kevincox 5y agoThey are essentially 3 graphs displayed together. It probably would have make sense to present them more separately.
- kevincox 5y agoThe article does not compare the throughput of different GCs other than different improvements. The baseline for the G1 graph is JDK8 G1 performance and the baseline for the ZGC graph is JDK11 ZGC performance. There is really nothing that can be directly compared between the two.
- Rovanion 5y agoAbsolute gc throughput and overhead.
- jbellis 5y agoOne of the graphs shows ZGC with almost 50% more overhead (in heap space) than G1, which could very well take some applications from "works fine" to "broken." So I can see why they'd leave it something to opt in to.
- vips7L 5y agoG1 is probably still a better choice as it "balances throughput and latency". ZGC also wasn't generational until recently.
- SureshG 5y agoProbably once ZGC gets the generation support (https://github.com/openjdk/zgc/tree/zgc_generational https://github.com/openjdk/zgc/tree/zgc_generational) which will reduce the memory footprint.