Improve Performance Quick and Cheap: Optimize Memory and Upgrade to Ruby 2.1
summary
Claims that memory optimization is the #1 thing to speed Rails apps, with concrete numbers: garbage collection sometimes consumes 70% of CPU time and upgrading to Ruby 2.1 yields about a 40% improvement in GC-heavy workloads. Demonstrated by a CSV job falling from ~20s to ~15s when switching to 2.1 and by further wins when switching to CSV line-by-line, in‑place string ops, GC tuning, ObjectSpace and Valgrind massif; also recommends process memory limits, forking workers, and running GC between requests.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:14Why?
- 7:23How?
- 7:40Tune Ruby GC
- 12:15Limit Growth
- 16:51Write Less Ruby
- 19:51Avoid Memory Hogs
- 23:17Tools
related talks
33mRails and the Ruby Garbage Collector: How to Speed Up Your Rails App
38mWhy I am excited about Ruby 2.1?
24mRuby Performance Secrets and How to Uncover Them
45mClosing Keynote: Analyzing and Reducing Ruby Memory Usage
01h 15mSpeedupRails, Speedup Your Code
47mBetter Ruby
21mUnderstanding Garbage Collection in Ruby
42mTweaking Ruby GC Parameters for Fun, Speed, and Profit
