~/talk

What causes Ruby memory bloat?

Talkat EuRuKo 2019 · 2019-06-21..06-22· [ruby]
slides:none on file

Investigates why multi threaded Ruby on Linux balloons in memory and finds the OS allocator behavior — many per thread arenas that hoard gray pages — causes most of the bloat. Builds tools to dump and visualize allocator heaps, demonstrates that calling malloc_trim during GC or switching to jemalloc cuts residency dramatically (uploader claims ~70% reduction; others report 17–20% in production) at a cost of ~7–20% CPU; packages fixes as FullStack Ruby deb/rpm/docker binaries.

AI-written summary · about

  1. 0:00Start
  2. 2:34A surprise announcement at the end
  3. 5:35PART 1 MEMORY ALLOCATION 101
  4. 9:03PART 2 RUBY MEMORY ORGANIZATION
  5. 20:13malloc_trim() Force freeing OS pages to the kernel
~/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.