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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Simon Hørup Eskildsen
May 06, 2013
Programming
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby Garbage Collection
Simon Hørup Eskildsen
May 06, 2013
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
720
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
640
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
490
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
670
EuRuKo 2015: Super-Reliable Software
sirupsen
12
3.6k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.7k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
350
GOTO Chicago: Patterns for Docker Success
sirupsen
1
340
Other Decks in Programming
See All in Programming
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
220
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
500
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
850
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
440
AIが無かった頃の素敵な出会いの話
codmoninc
1
430
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
210
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
180
プロポーザルを書いてもらう
pvcresin
0
500
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
150
数百円から始めるRuby電子工作
tarosay
0
150
源内ハンズオン概要編
hideg
0
170
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
380
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
310
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
860
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
390
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.3k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Crafting Experiences
bethany
1
250
Building Applications with DynamoDB
mza
96
7.2k
4 Signs Your Business is Dying
shpigford
187
22k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
GraphQLとの向き合い方2022年版
quramy
50
15k
For a Future-Friendly Web
brad_frost
183
10k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
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