Announcing the Rails Performance Apocrypha

by Nate Berkopec (@nateberkopec) of (who?), a Rails performance consultancy.
Summary: I've written a new book, compiled from 4 years of my email newsletter. (499 words / 3 minutes)


Hello Rubyists!

Today, I’m launching a new product: The Ruby on Rails Performance Apocrypha.

Over the last four years, I’ve written a lot of stuff to this newsletter. Until now, none of that stuff has been publicly accessible if you wanted to go back and read it again. If something useful was posted to the newsletter before you subscribed, you were just sort of screwed.

So, I’ve compiled 4 years of writing to this newsletter into a book. It covers my usual topics: performance science and engineering, frontend performance, Ruby performance, and scaling. It’s a fun ramble around all of these topics with a lot of tidbits and useful information scattered about. Each chapter is quite short, so it’s easy to pick up and put down again.

It’s available now on Gumroad for just $10. As always, it’s DRM-free and available in PDF, e-reader and even HTML and plain-text formats.

I called this book the “apocrypha”, because I consider my “main-line” of Rails performance instruction, the canonical “scripture”, to be my Rails Performance Workshop. By contrast, this book is a bit of an all-over-the-place ramble, and it covers some things that I didn’t cover in great detail in my other instructional books and workshops, such as HTTP/2 resource prioritization, and a detailed how-to on how to use New Relic’s Ruby VM information.

Here’s the chapter titles, in case you’re wondering what’s covered:

  • What I Value
  • Performance Science
  • Why Performance?
  • You Are Not a Compiler
  • What does 10% faster really mean?
  • Benchmarks for Rails Apps
  • Build-your-own APM
  • Reading Flamegraphs
  • DRM: Database, Ruby, Memory
  • Performance in the Design Space
  • Microservices and Trends
  • On Minitest
  • Corporate Support for Ruby
  • Why is Ruby Slow?
  • Popularity
  • Stinky Dependencies
  • Why Cache?
  • Software Quality at Startups
  • Frontend
  • Simple Frontend Config Changes
  • What is TTFB?
  • Always Use a CDN
  • Page Weights and Frontend Load Times
  • Lazy-loading
  • What’s Resource Prioritization?
  • HTML on the Wire
  • Exceptions: Silent, not Free
  • On Thread-Safety
  • What is the GVL?
  • Timeslicing the GVL
  • The GVL and C
  • Bloat
  • Minimum Viable Rails
  • The Weird Setting No One Used
  • Object Allocation
  • You Should Always Use a Production Profiler
  • Reproducing Issues Locally
  • Worker Killers
  • What’s QueryCache?
  • Reading New Relic’s Ruby VM Tab
  • Test Setup
  • What is Time Consumed?
  • Request Queue Times
  • Amdahl’s Law
  • Threads
  • CPU-bound or IO-bound?
  • What is Swap?
  • Database Pools
  • Single-thread Performance
  • Read Replicas
  • Why Lambda?
  • Never use Perf-M
  • Daily Restarts

Check it out on Gumroad.

SHARE:
Reddit

Want a faster website?

I'm Nate Berkopec (@nateberkopec). I write online about web performance from a full-stack developer's perspective. I primarily write about frontend performance and Ruby backends. If you liked this article and want to hear about the next one, click below. I don't spam - you'll receive about 1 email per week. It's all low-key, straight from me.

Products from Speedshop

The Complete Guide to Rails Performance is a full-stack performance book that gives you the tools to make Ruby on Rails applications faster, more scalable, and simpler to maintain.

Learn more

The Rails Performance Workshop is the big brother to my book. Learn step-by-step how to make your Rails app as fast as possible through a comprehensive video and hands-on workshop. Available for individuals, groups and large teams.

Learn more

More Posts

We Made Puma Faster With Sleep Sort

Puma 5 is a huge major release for the project. It brings several new experimental performance features, along with tons of bugfixes and features. Let's talk about some of the most important ones.

Read more

The Practical Effects of the GVL on Scaling in Ruby

MRI Ruby's Global VM Lock: frequently mislabeled, misunderstood and maligned. Does the GVL mean that Ruby has no concurrency story or CaN'T sCaLe? To understand completely, we have to dig through Ruby's Virtual Machine, queueing theory and Amdahl's Law. Sounds simple, right?

Read more

The World Follows Power Laws: Why Premature Optimization is Bad

Programmers vaguely realize that 'premature optimization is bad'. But what is premature optimization? I'll argue that any optimization that does not come from observed measurement, usually in production, is premature, and that this fact stems from natural facts about our world. By applying an empirical mindset to performance, we can...

Read more

Why Your Rails App is Slow: Lessons Learned from 3000+ Hours of Teaching

I've taught over 200 people at live workshops, worked with dozens of clients, and thousands of readers to make their Rails apps faster. What have I learned about performance work and Rails in the process? What makes apps slow? How do we make them faster?

Read more

Close

Get notified on new posts.

Straight from the author. No spam, no bullshit. Frequent email-only content.