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
560
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
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
ASP.NETアプリケーションのモダナイゼーションについて
tomokusaba
0
240
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
1
260
七輪ライブラリー: Claude AI で作る Next.js アプリ
suneo3476
1
170
Dissecting and Reconstructing Ruby Syntactic Structures
ydah
3
2k
オープンソースコントリビュート入門
_katsuma
0
120
スモールスタートで始めるためのLambda×モノリス(Lambdalith)
akihisaikeda
2
340
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
230
「理解」を重視したAI活用開発
fast_doctor
0
270
ComposeでWebアプリを作る技術
tbsten
0
130
UMAPをざっくりと理解 / Overview of UMAP
kaityo256
PRO
3
1.4k
eBPF超入門「o11yに使える」とは (20250424_eBPF_o11y)
thousanda
1
110
Featured
See All Featured
Faster Mobile Websites
deanohume
306
31k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Code Review Best Practice
trishagee
67
18k
Designing for humans not robots
tammielis
253
25k
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
The Cost Of JavaScript in 2023
addyosmani
49
7.8k
Being A Developer After 40
akosma
91
590k
Into the Great Unknown - MozCon
thekraken
38
1.7k
We Have a Design System, Now What?
morganepeng
52
7.5k
Optimising Largest Contentful Paint
csswizardry
37
3.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
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