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
460
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
型で語るカタ
irof
1
840
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
700
テスターからテストエンジニアへ ~新米テストエンジニアが歩んだ9ヶ月振り返り~
non0113
2
240
MySQL9でベクトルカラム登場!PHP×AWSでのAI/類似検索はこう変わる
suguruooki
1
230
CDK引数設計道場100本ノック
badmintoncryer
2
570
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
1
220
코딩 에이전트 체크리스트: Claude Code ver.
nacyot
0
990
What's new in Adaptive Android development
fornewid
0
110
TypeScriptでDXを上げろ! Hono編
yusukebe
3
870
QA x AIエコシステム段階構築作戦
osu
0
190
商品比較サービス「マイベスト」における パーソナライズレコメンドの第一歩
ucchiii43
0
200
レトロゲームから学ぶ通信技術の歴史
kimkim0106
0
130
Featured
See All Featured
A designer walks into a library…
pauljervisheath
207
24k
A Modern Web Designer's Workflow
chriscoyier
695
190k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Practical Orchestrator
shlominoach
189
11k
Bash Introduction
62gerente
613
210k
Code Reviewing Like a Champion
maltzj
524
40k
Navigating Team Friction
lara
187
15k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.5k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Embracing the Ebb and Flow
colly
86
4.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
990
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