Performance Optimization

Where the latency goes, where to put cache, how deadlines propagate, and the SRE Book's rules for not making it worse.

Overview

Faster without breaking it

Performance optimization is making something faster without breaking it. Many teams instead make changes that are faster most of the time and create subtle correctness or reliability issues at the tail.

The SRE Book's framing (Ch 21 and 22) is that performance is not a single number. The tail, p99 and p99.9, is what users feel. A change that improves the median by 20% but adds 5× to the p99 is usually a regression.

This chapter works through five ideas in order. It starts with latency budgets, moves to deadline propagation and caching tiers, and ends with two failure shapes to watch for: bimodal latency and the GC death spiral.

Key concepts

  • Latency budget
  • Deadline propagation
  • Bimodal latency
  • Capacity cache
  • Tail tolerance
  • GC death spiral

Interview questions

  • What's deadline propagation and why does it matter?
  • How do you decide which caching tier to use?
  • What's bimodal latency and why does it matter?

Sign up free to read the full topic

More SRE topics

Start free on Cariara · Coding problems · System design studio