~/talk

Understanding Garbage Collection in Ruby

Talkat RubyConf India 2024 · 2024-11-29..11-30· [ruby]
slides:none on file

Covers Ruby GC internals (mark/sweep, tricolor marking, compaction, generational GC) and shows how to gather and interpret metrics with GC.stat to find GC-related latency. Explains variable width allocation and highlights using Shopify autotuner middleware to recommend settings. Presents a real Rails monolith upgrade from Ruby 3.1 to 3.3 that causes a 70–80% regression in worst‑case latency and how techniques like process warmup, out-of-band GC and custom background‑job preprocessing restore performance.

AI-written summary · about

  1. 0:00Introduction and welcome
  2. 3:55Memory management in Ruby
  3. 6:09Garbage collection as memory manager
  4. 9:03Mark and sweep process
  5. 10:31Tricolor marking algorithm
  6. 12:24Garbage collection performance impact
  7. 13:56Generational garbage collection
  8. 15:49Debugging garbage collection issues
  9. 16:34Shopify's garbage collection autotuner
  10. 17:59Case study from Coupa
  11. 19:48Out of bound garbage collection
  12. 20:08Closing and acknowledgments
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.