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
570
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
640
EuRuKo 2015: Super-Reliable Software
sirupsen
12
3.1k
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
300
Other Decks in Programming
See All in Programming
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
220
Is Xcode slowly dying out in 2025?
uetyo
1
210
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
570
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
390
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
160
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
810
童醫院敏捷轉型的實踐經驗
cclai999
0
200
アンドパッドの Go 勉強会「 gopher 会」とその内容の紹介
andpad
0
270
NPOでのDevinの活用
codeforeveryone
0
430
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
900
Create a website using Spatial Web
akkeylab
0
310
XP, Testing and ninja testing
m_seki
3
210
Featured
See All Featured
How GitHub (no longer) Works
holman
314
140k
Being A Developer After 40
akosma
90
590k
Typedesign – Prime Four
hannesfritz
42
2.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Visualization
eitanlees
146
16k
Designing Experiences People Love
moore
142
24k
Facilitating Awesome Meetings
lara
54
6.4k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
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