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
Building Geospatial Apps on Postgres, PostGIS, & Citus at Large ScaleMicrosoft via YouTube Unlocking the Power of ML for Your JavaScript Applications with TensorFlow.js
TensorFlow via YouTube Managing the Reactive World with RxJava - Jake Wharton
ChariotSolutions via YouTube What's New in Grails 2.0
ChariotSolutions via YouTube Performance Analysis of Apache Spark and Presto in Cloud Environments
Databricks via YouTube