Under the Hood of Ruby's Generational Garbage Collector
summary
Ruby 2.1 adds a generational GC but C extensions force write barriers and many objects become “shady,” so minor GCs must scan more memory. A concrete profiler called Arbi Kit is built: a C gem that streams allocation and reference events over zero mq using MessagePack to a Qt desktop client and it works in production with low overhead. Demos show surprising counts like 29,000 strings and tuning effects from changing init heap slots and malloc_limit 16MB.
AI-written summary · about
chapters (10)
- 0:00Intro
- 0:55Generational Garbage Collector
- 7:13Key takeaways
- 8:25Memory profiling
- 10:58What is ARBIT
- 12:08ARBIT Kit
- 14:09Demo
- 18:18GC Tuning Visualization
- 19:02Ruby GC Heap in ID Slots
- 26:04Ruby GC Analog Limit
related talks
41mIncremental GC for Ruby interpreter
49mRabbit Hole: Garbage Collection and Ruby's Future
38mWhy I am excited about Ruby 2.1?
21mUnderstanding Garbage Collection in Ruby
42mTweaking Ruby GC Parameters for Fun, Speed, and Profit
53mRuby.inspect
37mDown the rb_newobj() Rabbit Hole: Garbage Collection in Ruby
35mThe Hitchhiker's Guide to Ruby GC
