~/talk

Compacting GC for MRI

Talkat Balkan Ruby 2019 · 2019-05-17..05-18· [ruby]
slides:none on file

Compacting GC for MRI ships with Ruby 2.7 and takes three years of development; it implements a two-finger compaction over Ruby’s 40-byte slot, 16KB page heap, moving objects then updating references (reference-updating is ~80% of the patch). It adds pinning bits and compaction callbacks so C extensions don’t break, maintains object_id via a seen-ID map, cuts fragmentation to reclaim measurable Rails heap space, and currently runs as a 4-step GC that the team plans to shrink to 2–3 steps.

AI-written summary · about

  1. 0:00Introduction and personal anecdotes
  2. 13:12What is compaction
  3. 22:27Ruby’s heap structure
  4. 23:52Two-finger compaction algorithm
  5. 27:53Updating references complexity
  6. 29:00Supporting C extensions
  7. 37:00Hidden references problem
  8. 41:57Marking references rule
  9. 42:17Object ID challenges
  10. 46:33Impact on memory usage
  11. 48:17Future improvements
~/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.