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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Simon Hørup Eskildsen
May 06, 2013
Programming
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
720
GOTO Copenhagen 2017: Shopify’s Architecture to Handle 80K RPS Sales
sirupsen
0
640
RailsConf 2016: 5 Years of Scaling Rails to 80K RPS
sirupsen
3
1.1k
Full Stack Fest 2016: Shopify in Multiple Datacenters
sirupsen
6
490
CUSEC 2016: Reliable Software in a Chaotic World
sirupsen
5
670
EuRuKo 2015: Super-Reliable Software
sirupsen
12
3.6k
DockerCon 2015: Resilient Routing and Discovery
sirupsen
22
6.7k
Goruco 2015: Building and Testing Resilient Applications
sirupsen
2
350
GOTO Chicago: Patterns for Docker Success
sirupsen
1
340
Other Decks in Programming
See All in Programming
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
120
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
240
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.6k
スマートグラスで並列バイブコーディング
hyshu
0
270
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
640
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
800
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
610
OSもどきOS
arkw
0
600
Lessons from Spec-Driven Development
simas
PRO
0
230
Vite+ Unified Toolchain for the Web
naokihaba
0
370
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
320
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
310
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
YesSQL, Process and Tooling at Scale
rocio
174
15k
Agile that works and the tools we love
rasmusluckow
331
22k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Building an army of robots
kneath
306
46k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
540
What's in a price? How to price your products and services
michaelherold
247
13k
We Are The Robots
honzajavorek
0
260
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