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
190
1
Share
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
710
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
630
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
480
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
660
EuRuKo 2015: Super-Reliable Software
sirupsen
12
3.6k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.6k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
340
GOTO Chicago: Patterns for Docker Success
sirupsen
1
330
Other Decks in Programming
See All in Programming
Making the RBS Parser Faster
soutaro
0
510
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
210
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
150
NakouPAY説明用
annouim0
0
260
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
110
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
160
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
170
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
800
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
24
14k
JOAI2026 1st solution - heron0519 -
heron0519
0
150
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
280
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
140
Utilizing Notion as your number one productivity tool
mfonobong
4
290
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
530
Raft: Consensus for Rubyists
vanstee
141
7.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
810
AI: The stuff that nobody shows you
jnunemaker
PRO
6
590
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Documentation Writing (for coders)
carmenintech
77
5.3k
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