~/talk

Keynote: Mark/Compact GC in MRI

Talkat Red Dot Ruby Conference 2017 · 2017-06-22..06-23· [ruby]
slides:none on file

Implements a mark-and-compact GC for MRI that actually moves objects using two-finger compaction, then walks and rewrites all object references; allocation stops the world and compaction is triggered via GC.compact. On a Rails heap compaction groups movable objects so free pages drop from ~552 total (528 with free space) to about 160 pages with allocatable space, but real-world memory use only improves ~2%. Measurements use malloc stack logging; main obstacles are C extensions, hash keys hashed by object address, and C global caches.

AI-written summary · about

  1. 0:00Intro
  2. 1:12@tenderlove
  3. 6:41L-TRAC Mouse
  4. 16:36Compactor needs 2 things
  5. 18:06Memory Layout
  6. 19:41Page Layout
  7. 22:45Tree of Objects
  8. 23:25Mark Phase
  9. 24:10Mark Code
  10. 24:45Free Space
  11. 27:10Compaction Steps
  12. 30:43Update References Pt 2
  13. 31:06Visiting Each Slot 3 Times
  14. 32:353 Problem Cases
  15. 32:48Regular References
  16. 33:42Mark Functions
  17. 35:20Hash Table
  18. 36:10Default Hash Function
  19. 40:46Before Compaction
  20. 48:35Stack Log
  21. 48:47Processing Code
  22. 49:19System Managed vs GC Managed
  23. 49:41OS X (100k slots)
~/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.