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
670
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
540
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
440
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
630
EuRuKo 2015: Super-Reliable Software
sirupsen
12
2.9k
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
GAEログのコスト削減
mot_techtalk
0
120
楽しく向き合う例外対応
okutsu
0
150
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.4k
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
130
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
150
DROBEの生成AI活用事例 with AWS
ippey
0
130
Rails アプリ地図考 Flush Cut
makicamel
1
120
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
180
昭和の職場からアジャイルの世界へ
kumagoro95
1
380
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
130
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
Ruby on cygwin 2025-02
fd0
0
150
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Documentation Writing (for coders)
carmenintech
67
4.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Art of Programming - Codeland 2020
erikaheidi
53
13k
A designer walks into a library…
pauljervisheath
205
24k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
RailsConf 2023
tenderlove
29
1k
We Have a Design System, Now What?
morganepeng
51
7.4k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
For a Future-Friendly Web
brad_frost
176
9.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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