6 ms·
Here is a blog that compares garbage collection across several versions and GC's: https://jet-start.sh/blog/2020/06/09/jdk-gc-benchmarks-part1 https://jet-start
by vips7L 5y ago
Here is a blog that compares garbage collection across several versions and GC's: https://jet-start.sh/blog/2020/06/09/jdk-gc-benchmarks-part1 https://jet-start.sh/blog/2020/06/09/jdk-gc-benchmarks-part1
They concluded:
"JDK 8 is an antiquated runtime. The default Parallel collector enters huge Full GC pauses and the G1, although having less frequent Full GCs, is stuck in an old version that uses just one thread to perform it, resulting in even longer pauses. Even on a moderate heap of 12 GB, the pauses were exceeding 20 seconds for Parallel and a full minute for G1. The ConcurrentMarkSweep collector is strictly worse than G1 in all scenarios, and its failure mode are multi-minute Full GC pauses."
- DarkmSparks 5y agoI forget, bit iirc it uses one by default, but you can specify the number of threads to use with XX:ParallelGCThreads=<N> which is what got depreciated later. its target is throughput rather than response so yep "pauses", but the entire job takes 4 hours instead of 40. In production those pauses vanish with load balancing. checking for jdk8 vs jdk17 turns up https://www.google.com/amp/s/www.infoworld.com/article/3606833/jdk-17-the-new-features-in-java-17.amp.html https://www.google.com/amp/s/www.infoworld.com/article/36068... "New Relic found that nearly 100 percent of users are running either JDK 11 or JDK 8, the two most recent LTS releases." so 17 being 8% faster than 11 apart from when its 10% slower, "maybe" slower or faster than 15 but they chose not to do a like for like comparison.... but 11 being catastrophically lower throughput than 8.... I may get some time soon to do some benching, I dont want to be back on 8, but the benching I did for at least 10 and 11 just made them a no go, completely crashing the jvm was an even bigger issue than the time.
- hilbertseries 5y agoAre you sure ParallelGCThreads was deprecated? The cms GC algorithm was deprecated but that doesn’t use that setting, which is used by the ParallelGC algorithm. The default was changed to the g1gc algorithm. But if you were manually specifying parallelgc that shouldn’t have been impacted.
- DarkmSparks 5y ago>Are you sure ParallelGCThreads was deprecated? Definitely not sure it was that op exactly, reasonably sure it was something related to it (maybe it no longer working with a gc it used to). TLDR:I found out "the hard way" -XX means "jvm specific, can change meaning at any time and is jvm vendor specific". oracle java 8 had a sweet spot that made perf awesome, nothing since has come close.
- zz865 5y agoG1 uses a lot more memory than CMS so we can't upgrade that. Is deprecated on 11 but we still use it.