Building the Next-Generation Garbage Collector in Ruby
summary
MMTK is integrated into Ruby via a Rust-backed runtime and a C binding that adds a fast-path bump-pointer allocator, plus support for moving Immix and a new Ruby heap growth policy. Benchmarks show parallel MMTK drops a GC cycle from 38.5ms to 11.9ms on 16 threads; current Ruby MMTK runs ActiveRecord ~233ms versus Ruby’s 148ms and uses ~86MB vs 68MB, so work remains on generational (sticky) Immix, finer-grained parallel work, and JIT-inlinable allocation.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:27Ruby's garbage collector
- 6:23Modular garbage collector
- 7:26MMTK overview
- 8:31MMTK advantages
- 12:24MMTK improvements
- 13:05Moving Immix
- 14:51Bump pointer allocator
- 19:10Ruby heap growth
- 23:27Future improvements
- 28:41Conclusion and Q&A
related talks
30mBuilding the Next-Generation Garbage Collector in Ruby
40mMemory management with MMTk: lessons learned from replacing Ruby's garbage collector
34mUnder the Hood of Ruby's Generational Garbage Collector
21mUnderstanding Garbage Collection in Ruby
34mIt's dangerous to GC alone. Take this!
41mIncremental GC for Ruby interpreter
42mTo Know A Garbage Collector
33mRails and the Ruby Garbage Collector: How to Speed Up Your Rails App
