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
650
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
460
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
430
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
580
EuRuKo 2015: Super-Reliable Software
sirupsen
12
2.6k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.3k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
290
GOTO Chicago: Patterns for Docker Success
sirupsen
1
280
Other Decks in Programming
See All in Programming
Let's learn code review
riofujimon
2
420
初心者のためのRubyKaigi入門/RubyKaigi Introduction
a_matsuda
2
790
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
230
ゆるい個人開発のススメ
kuroppe1819
10
990
"config" ってなんだ? / What is "config"?
okashoi
0
240
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
290
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
210
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
950
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
810
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
920
Milestoner
bkuhlmann
1
410
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
650
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
How to Ace a Technical Interview
jacobian
272
22k
A better future with KSS
kneath
231
16k
Building Adaptive Systems
keathley
31
1.9k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Why You Should Never Use an ORM
jnunemaker
PRO
51
8.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Documentation Writing (for coders)
carmenintech
60
3.9k
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