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
170
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
680
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
550
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
450
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
630
EuRuKo 2015: Super-Reliable Software
sirupsen
12
3k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.5k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
300
GOTO Chicago: Patterns for Docker Success
sirupsen
1
290
Other Decks in Programming
See All in Programming
フロントエンドテストの育て方
quramy
11
2.9k
マルチアカウント環境での、そこまでがんばらない RI/SP 運用設計
wa6sn
0
710
PHPのガベージコレクションを深掘りしよう
rinchoku
0
260
gen_statem - OTP's Unsung Hero
whatyouhide
1
190
Java 24まとめ / Java 24 summary
kishida
3
460
Signal-Based Data FetchingWith the New httpResource
manfredsteyer
PRO
0
160
Preact、HooksとSignalsの両立 / Preact: Harmonizing Hooks and Signals
ssssota
1
1.4k
タイムゾーンの奥地は思ったよりも闇深いかもしれない
suguruooki
1
570
The Weight of Data: Rethinking Cloud-Native Systems for the Age of AI
hollycummins
0
270
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
630
AI Coding Agent Enablement - エージェントを自走させよう
yukukotani
13
5.8k
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
480
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
23
2.6k
Raft: Consensus for Rubyists
vanstee
137
6.9k
A better future with KSS
kneath
239
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
119
51k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
For a Future-Friendly Web
brad_frost
176
9.7k
How to Think Like a Performance Engineer
csswizardry
23
1.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Unsuck your backbone
ammeep
670
57k
Code Reviewing Like a Champion
maltzj
522
39k
Into the Great Unknown - MozCon
thekraken
37
1.7k
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