~/talk

Methods of Memory Management in MRI

Talkat RubyConf Portugal 2016 · 2016-10-27..10-28· [ruby]
slides:none on file

MRI uses a mark-and-sweep collector that is generational and incremental, with write barriers and a remembered set to avoid missing newly-referenced objects. Ruby allocates 16KB slabs of 40-byte slots, uses tagged pointers for small integers/true/false/nil, and promotes objects after three GCs to promote to older generations. A page-segregation patch groups long-lived objects and reduces Rails heap by 17% smaller heap in tests. Useful tools: GC.stat, GC::Profiler, ObjectSpace.dump_all and undocumented RUBY_GC_* environment tunables.

AI-written summary · about

  1. 0:00Introduction
  2. 5:03Memory basics in Ruby
  3. 10:35Garbage collection algorithms
  4. 27:40Allocation algorithms
  5. 36:57Tagged pointers and hacks
  6. 38:21Copy-on-write issues
  7. 40:32Optimizing heap usage
  8. 43:03GC introspection APIs
  9. 46:14GC tuning in production
~/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.