Why I am excited about Ruby 2.1?
summary
Ruby 2.1 ships a generational GC that cuts tail latency for the 90th and 99th percentiles while out‑of‑the‑box memory often doubles even though retained object counts drop. Bench builds from GitHub show ~5–10% throughput gains and a 42% speedup on a large spec suite. New runtime hooks and a heap dump API plus tools like abtrace, a memory profiler gem and flame graphs let teams find leaks, trace allocations to file and line, and try jemalloc or an out‑of‑band GC gem to reduce long‑term RSS.
AI-written summary · about
chapters (28)
- 0:00Intro
- 1:08Ruby gems
- 2:50Ruby 21 issues
- 3:27Discourse bench
- 8:06Minor GC
- 8:42Major GC
- 10:51GitHub
- 12:09My recommendation
- 12:55Bench performance
- 13:08Outofband GC
- 15:08Unicorns
- 16:15Extra flag
- 17:51Saving memory
- 18:41Speeding up spec suites
- 20:20RBTrace gem
- 21:10Annotator
- 22:21Apache Bench
- 22:53Leaking Objects
- 23:23Heap Dump
- 24:14Memory Profiling
- 24:54Report Cards
- 28:04String F
- 28:28ActiveRecord
- 29:14String Freeze
- 30:41New hooks
- 31:24String scrub
- 32:42The future
- 33:32The good news
related talks
42mTweaking Ruby GC Parameters for Fun, Speed, and Profit
34mUnder the Hood of Ruby's Generational Garbage Collector
41mIncremental GC for Ruby interpreter
46mRuby3: What's Missing?
33mRails and the Ruby Garbage Collector: How to Speed Up Your Rails App
42mRuby 124c41+
21mUnderstanding Garbage Collection in Ruby
29mImprove Performance Quick and Cheap: Optimize Memory and Upgrade to Ruby 2.1
