Six Years of Ruby Performance: A History, by Noah Gibbs

Abstract

Ruby keeps getting faster. And people keep asking, "but how fast is it for Rails?" Rails makes a great way to measure Ruby's speed, and how Ruby has changed version-by-version. Let's look at six years of performance graphs for apps big and small. How fast is 2.6.0? With JIT? How close is Ruby 3x3?

Details

By the end of the talk, the audience should understand about how fast modern Ruby is compared to 2.0, and what kind of apps get how much of a speedup. They will also know where to find small, simple benchmarks that can help them check the same results for themselves or write and modify their own.

Rails Ruby Bench is already a good answer to the question, "how is performance for big, real-world Rails apps?" But RRB doesn't answer about smaller Ruby apps -- and it is very difficult to set up and run. Also, each version of Discourse only works with a few specific Ruby versions.

This talk presents smaller benchmarks, which are easier to run with fewer dependencies. With those smaller benchmarks, it is much easier to measure performance uniformly for all Rubies from 2.0 to 2.6.

We'll also look at how smaller Rails benchmarks give 'messier' results - they don't change exactly like Rails Ruby Bench from version to version, and different routes show different speedups and slowdowns between versions. These are essentially large microbenchmarks, and we'll talk about how microbenchmarks give different results than larger, more comprehensive benchmarks.

The talk will be roughly structured as:

  • "Real World Rails" History: Rails Ruby Bench and its results from Ruby 2.0 to 2.6
  • Problems with Rails Ruby Bench and benefits of smaller, easier benchmarks
  • Some simpler benchmarks with a speed history from 2.0 to 2.6, including JIT ** Rack and Rails "Hello, World" routes ** Effects of Higher Concurrency ** Ruby computation-heavy jobs and routes ** ActiveRecord, using in-memory SQLite ** Rails with Discourse-like additions such as simple authentication
  • Other concerns: Future JIT, JRuby, App Servers, Mac vs Linux, Warmup Iterations
  • Conclusion ("Other concerns" list is not final)

Pitch

Performance is always important, especially with Ruby 3x3. And Rails speed is one of the first questions people ask about performance. Performance history tells developers when to update, what improvements to expect, and how to predict performance in the future.

I work full-time on Ruby performance and tooling, especially on the Rails Ruby Bench benchmark. You can find my Ruby performance writing at engineering.appfolio.com. This talk builds on my RRB work by adding new, smaller Rails-based benchmarks. You can see articles about these new benchmarks at engineering.appfolio.com starting in mid-January.

Edit proposal

Submissions

RailsConf 2019 - Rejected [Edit]

RubyKaigi 2019 - Waitlisted [Edit]

Brighton Ruby 2019 - Accepted [Edit]

Add submission