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
700
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
600
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
460
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
650
EuRuKo 2015: Super-Reliable Software
sirupsen
12
3.3k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.6k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
320
GOTO Chicago: Patterns for Docker Success
sirupsen
1
310
Other Decks in Programming
See All in Programming
r2-image-worker
yusukebe
1
170
モビリティSaaSにおけるデータ利活用の発展
nealle
0
340
2025 컴포즈 마법사
jisungbin
0
130
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
390
AI POSにおけるLLM Observability基盤の導入 ― サイバーエージェントDXインターン成果報告
hekuchan
0
590
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
280
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
610
Register is more than clipboard
satorunooshie
1
470
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
13
12k
目的で駆動する、AI時代のアーキテクチャ設計 / purpose-driven-architecture
minodriven
1
110
開発生産性が組織文化になるまでの軌跡
tonegawa07
0
170
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
550
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Designing for humans not robots
tammielis
254
26k
Speed Design
sergeychernyshev
32
1.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
Become a Pro
speakerdeck
PRO
29
5.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
670
A Tale of Four Properties
chriscoyier
162
23k
A designer walks into a library…
pauljervisheath
210
24k
How STYLIGHT went responsive
nonsquared
100
5.9k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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