3 ms·
Deconstructing the Garbage-First Collector [pdf]
- pulse7 5y agoFrom abstract: "It is used in the HotSpot and OpenJDK virtual machines" => Isn't HotSpot part of OpenJDK?
- pjmlp 5y agoNot all OpenJDK based JVM implementations use Hotspot, for example Azul has Falcon. https://www.azul.com/products/components/falcon-jit-compiler/ https://www.azul.com/products/components/falcon-jit-compiler...
- pulse7 5y agoOK. But HotSpot should be part of the OpenJDK source code - which is excluded/not used by some distributions...
- pron 5y agoThere is currently exactly one JVM in OpenJDK, which is HotSpot. It is true that there are non-OpenJDK JDKs that use some parts of OpenJDK and combine it with other code. The OpenJDK project is very explicit that only projects that are built entirely of the OpenJDK sources with only very minor modifications can use the name OpenJDK (https://openjdk.java.net/legal/openjdk-trademark-notice.html https://openjdk.java.net/legal/openjdk-trademark-notice.html). OpenJDK implies HotSpot and HotSpot only, although in the future OpenJDK might include other VMs. So even though the Azul Zing IBMs OpenJ9 JDKs use parts of the OpenJDK sources, they are definitely not "OpenJDK-based" in a meaningful sense. About 40% of the work on OpenJDK, and so the JEPs and issues, takes place in its VM, and so don't apply to projects that only use other parts of the codebase.
- pjmlp 5y agoI appreciate your clarifications and welcome all corrections, unfortunately like the LTS stuff, most Java shops are completely unaware of those differences. Maybe Oracle could provide another channels to actually spread this knowledge other than forums that 90% of corporate Java devs don't use.
- pron 5y agoI realise that, but I don't think there's that much need for the vast majority of Java developers to know this stuff. Unfortunately, there's much more important stuff -- like jlink -- that we're having a hard time spreading. I hope the new website, https://dev.java/ https://dev.java/, helps.
- pron 5y agoYes. The OpenJDK VM and HotSpot are different names of the same thing.
- deleted 5y ago[deleted]
- toolslive 5y agoit's quite interesting as it describes the relationships, differences and lineage for 6 garbage collectors. This makes the whole thing quite digestible.
- the-alchemist 5y agoFor the curious, this is a deep, technical analysis of the latest generations (no pun intended!) of best-of-breed garbage collectors on the JVM. By best-of-breed, I mean G1, Shenandoah, and ZGC. Honestly, for those of us who grew up on the 90s JVM, seeing millisecond GC pauses is kinda of a miracle. GC research didn't stop in the 90s, and the JVM has always been on the cutting-edge in putting the latest research into production.
- native_samples 5y agoAlso relevant is this series: https://jet-start.sh/blog/2020/06/09/jdk-gc-benchmarks-part1 https://jet-start.sh/blog/2020/06/09/jdk-gc-benchmarks-part1 "On modern JDK versions, the G1 is one monster of a collector. It handles heaps of dozens of GB with ease (we tried 60 GB), keeping maximum GC pauses within 200 ms." (note: 200msec is its default goal, not the limit of what it can do) Java has a reputation for needing complex GC tuning. Over time the need for this has fallen away as the GC technology has improved. https://jet-start.sh/blog/2021/03/17/billion-events-per-second https://jet-start.sh/blog/2021/03/17/billion-events-per-seco... "In our previous experience, we found you don't need any low-level GC tuning parameters to get great latency results on the JVM, but you do have to use a recent JDK. We let the JVM use its default G1 collector and configured it with our desired GC pause target." "the maximum throughput at which a single Hazelcast Jet node maintains 99.99% latency within 10 ms now lies at 20 million items per second, a 250% boost!" The JET guys show that a modern JVM (newer than Java 11) can achieve stunning throughputs with extremely low pause times. At 60fps each frame has 16 milliseconds to run. Obviously JET is a server and not a client-side app, but it helps put in perspective how impressive it is that your server could easily be running at "60fps" whilst processing 20 million items a second!
- kaba0 5y agoWhere can one find resources to better understand state-of-the-art runtimes, like the OpenJDK project? Is there some mandatory books on the topic? I am subscribed to a few mailing lists, but I really only have a shallow understanding unfortunately. Should I really try to deep dive into the code base? Without some guidance it seems impossible…