Many Ruby Performance posts here are linked to engineering.appfolio.com - I wrote for that site as AppFolio’s Ruby Fellow for many years, and I’m quite happy to link to them.
About Ruby and Rails Performance practically:
- My 2018 RubyKaigi talk was called Faster Apps, No Memory Thrash and was about optimising your Ruby apps for memory, and how Ruby’s memory system works in general (slides)
- I was on the Remote Ruby podcast to talk about Ruby 2.6+ JIT
- Ruby’s Memory Environment Variables - Simpler Than They Look
- Where Does Rails Spend Its Time? - an analysis with a profiler of where the Rails framework spends its in-Ruby time
- Benchmarking Threads vs Processes vs Fibers - how do the speed of those three compare? How has it changed over time?
- Measuring Rails Overhead - how much overhead does using Rails add?
- Benchmarking Ruby’s Heap: malloc, tcmalloc, jemalloc - you’ll hear folks recommend alternative allocators as one of the easiest ways to pick up some free speed; short version: I agree
- CRuby’s Memory Slots: See Them, Tweak Them, Make Them Fast
- The Ruby Global Method Cache - including what it is and how to tune it for performance
- Ruby Method Lookup - an obscure corner of Ruby optimisation, but occasionally useful
- Rails Ruby Bench - the Ruby benchmark I wrote, what it is and why you might care
- OptCarrot: An Excellent CPU Benchmark for Ruby 3x3 - by looking at an existing benchmark, you can think about what to add to yours
- Building Ruby with Memory Profiling - not a bad guide to generally building Ruby with modifications
- Wrk it! - I like wrk, as load-testing tools go; here’s an explanation
About Benchmarking, Profiling and Performance in general:
- I was on the Ruby Rogues talking about measuring performance
- What About Warmup? - this benchmarking of Ruby warmup shows you some interesting things about warmup in general
- Can I Use Ten 10% Speedups to Make Ruby Instant? - performance math explained; not Ruby-specific
- Microbenchmarks vs Macrobenchmarks - what different sizes of benchmark can measure
- Profiling Ruby Like an A/B Tester - using Ruby as an example of why it’s important to use statistical tests to validate your optimisations
About Ruby’s (or Rails’) performance historically:
- Video of my 2019 RubyKaigi talk about Six Years of Ruby Performance and how it has changed over that time (slides); this talk covers both a quick summary of the large Rails app work I’m known for and a deep dive into some simpler benchmarks
- A Ruby Speed Roundup, 2.0 through 2.6 - how has Ruby performance changed over time?
- At RubyKaigi 2017, my talk was How Close is Ruby 3x3 for Real Web Apps?, which introduced Rails Ruby Bench (slides)
- Rails and Discourse Startup Times - Rails and Discourse startup times examined in historical Ruby versions
Some Fairly Academic Links (not written/spoken by me):
- Performance Matters, by Emery Berger (video) - talks about stability in benchmark results, and subtleties thereof
- Virtual Machine Warmup Blows Hot and Cold - this dense whitepaper lets you know: warmup isn’t cut-and-dried, and often doesn’t work like that at all; hat-tip to Chris Seaton for the link
- Rigorous Benchmarking in Reasonable Time - another dense whitepaper, this one about how to take benchmarking samples with an eye toward getting a reasonable confidence interval