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
660
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
510
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
620
EuRuKo 2015: Super-Reliable Software
sirupsen
12
2.9k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.4k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
290
GOTO Chicago: Patterns for Docker Success
sirupsen
1
290
Other Decks in Programming
See All in Programming
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
1k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
Jakarta EE meets AI
ivargrimstad
0
170
CSC509 Lecture 12
javiergs
PRO
0
160
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.8k
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
デザインパターンで理解するLLMエージェントの作り方 / How to develop an LLM agent using agentic design patterns
rkaga
3
190
Jakarta EE meets AI
ivargrimstad
0
640
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.3k
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
Visualization
eitanlees
145
15k
Into the Great Unknown - MozCon
thekraken
32
1.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Teambox: Starting and Learning
jrom
133
8.8k
What's new in Ruby 2.0
geeforr
343
31k
Fireside Chat
paigeccino
34
3k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Practical Orchestrator
shlominoach
186
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.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