~/talk

Reduce Memory by Using More

Talkat rubyday 2020 · on Wednesday, 2020-09-16· [ruby]
slides:none on file

A patch changes heap pages to 16KB pages so jemalloc uses full buckets, yielding about ~10% memory saving in rdoc benchmarks (50 runs) by eliminating internal fragmentation. Concurrent compaction is implemented with an mprotect read barrier and per-page packing so reference updates still pause but movement runs alongside sweeping. Profiling with Instruments shows mprotect was costly until batched per-page movement amortizes calls, bringing performance back near baseline.

AI-written summary · about

  1. 0:00Start
  2. 7:28Heap Before Compaction
  3. 7:40Heap After Compaction
  4. 10:57Compaction Goals
  5. 16:54Sweep Process After Marking
  6. 21:21Ruby Class Hierarchy
  7. 22:16Sweep Process Sweeping Classes
  8. 23:54Crash Backtrace
  9. 25:23Where to add read barriers?
  10. 26:16Read Barrier Execution Point
  11. 28:32Ruby Page Allocation
  12. 28:49HEAP PAGE ALIGN
  13. 30:20Memory Usage Over Time jemalloc
  14. 31:03Old Size vs New Size
  15. 32:08Page Widen Diff
  16. 32:37Compact + Read Barrier
  17. 34:09Using Instruments
  18. 34:57Bottleneck: mprotect
  19. 38:35Comparing to Master
  20. 40:08Automatic Compaction in Action
~/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.