Closed ubiratansoares closed 2 years ago
Thanks @ubiratansoares . Are there any benchmarks that show that ZGC is faster than the parallel GC for Gradle builds? If so I'm happy to accept this change.
The article I've linked shows some GC benchmarks using SPECjbb® 2015, but I'm not sure how realistic such results are in the specific context of Gradle builds.
Are you aware of any existing benchmarks comparing GC impact for G1 and Parallel in Gradle builds? Asking because they could be a good starting point to evaluate ZGC as well :)
Thanks @ubiratansoares . The results for SPECjbb are not relevant for Android builds. Those results also show that G1 is faster than Parallel for those applications. The opposite, however, is true for Gradle builds especially Android Gradle builds. Google has done several internal benchmarks showing that Parallel GC is faster than G1 which is why they make that recommendation on their website. I have also done a benchmark here to show that it is faster for build performance: https://github.com/uber-common/android-build-eval/pull/3
This is the only benchmark I've found: https://twitter.com/mreichelt/status/1464010532059586562
Hey @runningcode, I'll close this one for now; if eventually we have some numbers / benchmarks pointing to a good fit for ZGC in Gradle projects - maybe with some other GC-tuning shenanigans! - I'd be happy to re-open this issue :)
Thanks for the pointers you've shared!
@ubiratansoares have you tried -XX:+UseShenandoahGC
as well?
@morj Actually not, have you? 👀
With the release of* JDK17, ZGC is considered production-ready.
However, when applying
for my JVM args Gradle Doctor complains that I'm not using the recommend Parallel GC.
I have an Android project which is fully ready for JDK17 (using Gradle 7.3 and Kotlin 1.6.0) and I wanted to benchmark some builds with ZGC since it seems to deliver great throughput with shorter GC pauses; in my case I can opt-out from the GC prescription if I want so I can proceed with the benchmarks at all.
However I was wondering if we could improve the actual Gradle Doctor prescription by
This feature request is not critical for the short term since JDK17 just landed. I'd be happy to raise a PR around it. 🙂