Automatic GC Compaction in MRI
Offered By: Ruby Central via YouTube
Course Description
Overview
Explore the intricacies of automatic garbage collection compaction in MRI Ruby in this 34-minute conference talk. Delve into the evolution from manual to automatic compaction processes introduced in Ruby 2.7, examining implementation techniques like read barriers and concurrent GC execution. Gain insights into heap management, memory usage optimization, and the challenges faced during automation. Analyze the compaction process, including sweep operations, reference updates, and crash handling. Investigate Ruby's class hierarchy, page allocation, and memory usage patterns. Learn about performance bottlenecks, instrumentation tools, and the impact of automatic compaction on garbage collection efficiency. Discover how to control auto-compaction and compare its performance to previous implementations.
Syllabus
Intro
Heap Compaction In a Rails app
Heap Before Compaction
Compaction Process
Compaction Goals
Heap Comparison Before and After Compaction
Empty Destination Required! Movement
Sweep Process After Marking
Sweep + Update References Sweep is Paused
Sweep Continues Finish up!
Ruby Class Hierarchy
Sweep Process Sweeping Classes
Sweep + Move Process After Marking
Crash Backtrace
mprotect() requirements
Ruby Page Allocation
Memory Usage Over Time jemalloc
Old Size vs New Size
Page Widen Diff
Compact + Read Barrier
Using Instruments
Bottleneck: mprotect
Comparing to Master
Automatic Compaction in Action
Auto Compaction Control
Major GC: Objects Per Second (higher is better)
Taught by
Ruby Central
Related Courses
Heterogeneous Parallel ProgrammingUniversity of Illinois at Urbana-Champaign via Coursera Advanced Operating Systems
Georgia Institute of Technology via Udacity 計算機程式設計 (Computer Programming)
National Taiwan University via Coursera Introduction to Operating Systems
Georgia Institute of Technology via Udacity Android Performance
Google via Udacity