Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby Garbage Collection
Search
Simon Hørup Eskildsen
May 06, 2013
Programming
1
180
Ruby Garbage Collection
Simon Hørup Eskildsen
May 06, 2013
Tweet
Share
More Decks by Simon Hørup Eskildsen
See All by Simon Hørup Eskildsen
Advanced Napkin Math: Estimating System's Performance from First Principles
sirupsen
3
690
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
590
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
460
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
650
EuRuKo 2015: Super-Reliable Software
sirupsen
12
3.2k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.6k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
310
GOTO Chicago: Patterns for Docker Success
sirupsen
1
310
Other Decks in Programming
See All in Programming
あなたの知らない「動画広告」の世界 - iOSDC Japan 2025
ukitaka
0
300
Local Peer-to-Peer APIはどのように使われていくのか?
hal_spidernight
2
410
CI_CD「健康診断」のススメ。現場でのボトルネック特定から、健康診断を通じた組織的な改善手法
teamlab
PRO
0
140
CSC509 Lecture 03
javiergs
PRO
0
320
Build your own WebP codec in Swift
kishikawakatsumi
2
840
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osk2025-duckdb
takahashiikki
1
230
CSC509 Lecture 01
javiergs
PRO
1
430
iOSDC.pdf
chronos2500
2
640
OWASP Kansai DAY 2025.09: OSINTにふれてみよう
deka_morita
0
160
大規模アプリにおけるXcode Previews実用化までの道のり
ikesyo
0
950
実践AIチャットボットUI実装入門
syumai
7
2.3k
dynamic!
moro
9
4.3k
Featured
See All Featured
Building an army of robots
kneath
306
46k
Being A Developer After 40
akosma
90
590k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
4 Signs Your Business is Dying
shpigford
185
22k
Side Projects
sachag
455
43k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.2k
Into the Great Unknown - MozCon
thekraken
40
2.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
188
55k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Transcript
Ruby Garbage Collection Simon Hørup Eskildsen @Sirupsen
None
Mark and Sweep (< 1.9) Lazy Sweeping (>= 1.9) Lazy
Bitmask Sweeping (2.0) Geneartional GC (2.1?) Concurrent GC (??)
Mark and Sweep
None
None
RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE
None
None
Root objects Freeable
None
RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE
RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE
None
RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE
Free List
RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE
Free List
RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE Free
List
RVALUE RCLASS RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE RVALUE Free
List
The Copy-on-Write Problem
None
None
Process #2 Process #1
Process #2 Process #1
None
None
Process #2 Process #1 ? ? ? ? ? ?
?
None
Process #2 Process #1
Ruby 2.0
0 0 1 0 0 1 1
None
Process #2 Process #1 bar foo
CoW problem fixed: => Less memory => Faster
Geneartional GC Ruby 2.1?
Root objects Freeable M&S Freeable
Old Root objects Freeable Old M&S Freeable
Prospects of a Concurrent GC