Hacker News with Generative AI: Garbage Collection

CPython's Garbage Collector and Its Impact on Application Performance (codingconfessions.com)
Learn how the knowledge of CPython internals translate into performance insights for your code
Shenandoah GC (openjdk.org)
Shenandoah is the low pause time garbage collector that reduces GC pause times by performing more garbage collection work concurrently with the running Java program.
Next Generation Out of Band Garbage Collection (railsatscale.com)
In 2023, I wrote about how we’ve tuned Ruby’s garbage collector for Shopify’s monolith, including how we implemented out-of-band garbage collection to reduce the impact of major collection on latency.
A Performance Comparison of Modern Garbage Collectors (2021) [pdf] (rodrigo-bruno.github.io)
Incremental Garbage Collection in Ruby 2.2 (2015) (heroku.com)
This article introduces incremental garbage collection (GC) which has been introduced in Ruby 2.2. We call this algorithm RincGC. RincGC achieves short GC pause times compared to Ruby 2.1.
JVM statistics cause garbage collection pauses (2015) (evanjones.ca)
TL;DR: The JVM by default exports statistics by mmap-ing a file in /tmp (hsperfdata). On Linux, modifying a memory mapped file can block until disk I/O completes, which can be hundreds of milliseconds. Since the JVM modifies these statistics during garbage collection and safepoints, this causes pauses that are hundreds of milliseconds long. To reduce worst-case pause latencies, add the -XX:+PerfDisableSharedMem JVM flag to disable this feature. This will break tools that read this file, like jstat.
Conservative GC can be faster than precise GC (wingolog.org)
Should your garbage collector be precise or conservative? The prevailing wisdom is that precise is always better. Conservative GC can retain more objects than strictly necessary, making GC slow: GC has to more frequently, and it has to trace a larger heap on each collection. However the calculus is not as straightforward as most people think, and indeed there are some reasons to expect that conservative root-finding can result in faster systems.
Crash the GC with Random Values in Unsafe.Pointers (philpearl.github.io)
Deconstructing the Garbage-First Collector (2020) [pdf] (steveblackburn.org)
Making PyPy's GC and JIT produce a sound [video] (youtube.com)
Techniques for safe garbage collection in Rust (kyju.org)
Whippet is a garbage collector library for language run-time authors (wingolog.org)
Crafting Interpreters with Rust: On Garbage Collection (tunglevo.com)
Tracing garbage collection for arenas (btmc.substack.com)
Beginner's guide to the Shenandoah garbage collector (redhat.com)
Parallel garbage collection for SBCL (2023) (zenodo.org)
Garbage Collectors Are Scary (enyo.de)