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
660
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
510
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
440
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
620
EuRuKo 2015: Super-Reliable Software
sirupsen
12
2.8k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.4k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
290
GOTO Chicago: Patterns for Docker Success
sirupsen
1
290
Other Decks in Programming
See All in Programming
マルチモジュールにおけるテスト最適化
fxwx23
0
210
いまから追い上げる、Jetpack Compose トレーニング
nyafunta9858
0
590
実践!難読化ガイド
mitchan
0
210
Swiftコードバトル必勝法
toshi0383
0
170
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
810
KSPの導入・移行を前向きに検討しよう!
shxun6934
PRO
0
280
今インフラ技術をイチから学び直すなら
yuhta28
1
140
Some more adventure of Happy Eyeballs
coe401_
2
190
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
1k
Shinjuku.rb#95:心の技術書紹介
free_world21
1
110
Google Sign-inの移行から始めるCredential Manager活用
clockvoid
0
310
Pythonで改めて考える「クラス(class)」の使いどころ
os1ma
2
660
Featured
See All Featured
Facilitating Awesome Meetings
lara
49
6k
Happy Clients
brianwarren
96
6.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
1
54
The Cost Of JavaScript in 2023
addyosmani
42
5.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
Optimizing for Happiness
mojombo
375
69k
Code Reviewing Like a Champion
maltzj
517
39k
Automating Front-end Workflow
addyosmani
1365
200k
Why You Should Never Use an ORM
jnunemaker
PRO
53
8.9k
Testing 201, or: Great Expectations
jmmastey
36
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