Performance Engineering roadmap
Seventeen modules, from what latency really means to profiling the Linux kernel. Pick the route that fits the job you want, then follow the map.
7 parts · 17 modules · 188 lessons · Lessons being written
Lessons being written
Course overviewFoundations
Module 01: Performance engineering fundamentals
Explain latency, throughput and utilization, why busy systems slow down, and set performance goals.10 lessons- Introduction to performance engineering
- Why performance matters: users, costs and scale
- Performance engineering roles: what the job involves
- Latency, throughput and utilization: the core ideas
- Queueing basics: why systems slow down when busy
- The performance workflow: measure, change, verify
- Performance goals and budgets
- Performance myths that waste time
- Numbers every performance engineer should know
- Design: setting performance goals for a checkout page
Module 02: How computers run code: CPU, memory and the OS
Describe what the CPU, memory, operating system and network do when code runs, and what each costs.12 lessons- CPU basics: instructions, cycles and clock speed
- Pipelines, branches and speculative execution
- The memory hierarchy: from registers to disk
- Virtual memory and page faults
- Processes, threads and context switches
- System calls: the cost of asking the kernel
- Scheduling: how the OS shares CPU time
- Storage devices: SSD and disk latency
- Network basics for performance: TCP, RTT and bandwidth
- Concurrency and parallelism
- Containers and VMs: hidden performance costs
- Cloud instances: vCPUs, limits and noisy neighbours
Measuring performance
Module 03: Performance principles and methodology
Investigate a slow system with a method (USE, RED, percentiles) instead of guessing.11 lessons- Measuring latency: what to time and where
- Throughput and utilization in practice
- Percentiles and tail latency
- The USE method: utilization, saturation and errors
- The RED method for services
- Finding the bottleneck: the limiting resource
- Amdahl’s law: the limits of speeding up
- Queueing theory for engineers
- Performance anti-methods: how not to investigate
- Statistics for performance data
- Design: diagnosing a slow API end to end
Module 04: Benchmarking
Write benchmarks in Java, Go and Python that give honest answers, and gate regressions in CI.10 lessons- Benchmarking: measuring performance fairly
- Microbenchmarks: traps that give wrong answers
- Benchmarking Java code with JMH
- Benchmarking Go code with testing.B
- Benchmarking Python code with pyperf
- Realistic workloads and macrobenchmarks
- Warm-up, noise and run-to-run variance
- Comparing benchmark results statistically
- Continuous benchmarking and regression gates in CI
- Common benchmarking mistakes
Module 05: Profiling
Find where time goes with flame graphs, CPU, memory, off-CPU and lock profiles.12 lessons- Profiling: finding where the time goes
- Sampling and instrumenting profilers
- Flame graphs: seeing where CPU time goes
- Profiling Java with async-profiler and JFR
- Profiling Go with pprof
- Profiling Python with py-spy and cProfile
- Profiling native code with perf
- Memory profiling and allocation tracking
- Off-CPU analysis: time spent waiting
- Lock and contention profiling
- Continuous profiling in production
- Design: finding a CPU hotspot in a payment service
Code and runtime performance
Module 06: Code optimization
Make hot code do less work: better algorithms, fewer allocations, cheaper I/O.12 lessons- Algorithms first: complexity on real data
- Data structures and memory layout
- Memory allocation: the hidden cost in hot code
- Reducing allocations: pools, reuse and arenas
- Strings, serialization and copying costs
- Efficient I/O: buffering, batching and streaming
- Memoization and in-process caches
- What compilers optimize, and what they can’t
- Speeding up Python: NumPy, native code and beyond
- Writing fast Go
- Writing fast Java
- Design: making a slow report generator fast
Module 07: Garbage collection and runtimes
Tune garbage collectors and runtimes in Java, Go and Python, and find memory leaks.11 lessons- Memory management: manual, counted and traced
- How garbage collectors work
- Java garbage collectors: G1 and ZGC in practice
- Go’s garbage collector and GOGC
- Python memory: reference counting and the GIL
- JIT compilation: how runtimes speed up hot code
- Startup time and warm-up
- Memory leaks in managed languages
- Runtime settings for containers
- Case: Discord’s garbage collection spikes, Go to Rust
- Design: fixing GC pauses in a Java service
Module 08: Concurrency and async performance
Size thread pools, use event loops and async code well, and measure contention.12 lessons- Thread pools: sizing them for the workload
- Event loops: one thread, many connections
- Async Python with asyncio
- Goroutines and the Go scheduler
- Java virtual threads in practice
- Blocking calls inside async code
- Locks, contention and critical sections
- Concurrent data structures in practice
- Queues and backpressure inside one process
- Measuring concurrency: queues and utilization
- Free-threaded Python: life without the GIL
- Design: from 1,000 to 50,000 connections
Data and distributed performance
Module 09: Database and storage performance
Diagnose slow queries, connection pools, locks and disk I/O in production.12 lessons- Database performance: where the time goes
- Finding slow queries in production
- Indexes in practice: when they help and hurt
- N+1 queries and other ORM traps
- Connection pools: sizing and wait time
- Lock contention and long transactions
- Caches in front of databases: measuring hit rates
- Disk I/O: IOPS, throughput and latency
- File systems and the page cache
- Cloud storage bottlenecks: volumes and quotas
- Write amplification and compaction costs
- Design: speeding up a slow product search page
Module 10: Distributed systems performance
Find where latency goes between services: RPCs, fan-out, retries and coordination.12 lessons- Network latency: where the milliseconds go
- RPC overhead: serialization, connections and hops
- HTTP/2, gRPC and connection reuse
- Fan-out: how tail latency multiplies
- Contention across services
- Backpressure and flow control between services
- Coordination costs: locks, consensus and transactions
- Caching across services: measuring the gain
- Timeouts and retries: their performance cost
- Data locality and placement
- Case: Cloudflare’s Pingora proxy
- Design: cutting checkout latency across microservices
Performance at scale and in production
Module 11: Load and stress testing
Design realistic load, stress, soak and spike tests, and read their results correctly.13 lessons- Load testing: why, when and what to measure
- Workload models: describing realistic traffic
- JMeter: the most widely used load testing tool
- k6, Gatling, Locust and LoadRunner compared
- Coordinated omission: why load tests lie
- Stress testing: finding the breaking point
- Soak tests: finding slow leaks
- Spike tests and autoscaling behaviour
- Concurrency limits and admission control
- Resource utilization under load
- Load testing production safely
- Reading and reporting load test results
- Design: load testing a festival sale
Module 12: Production performance
Measure p95 and p99 correctly, use APM and tracing, and plan capacity from real data.14 lessons- Performance signals: what to watch in production
- APM tools: what they show and how to use them
- Distributed tracing: finding the slow span
- Measuring p95 and p99 correctly
- Histograms: why averaging percentiles is wrong
- Thread dumps, heap dumps and GC logs
- Catching performance regressions early
- Profiling in production safely
- Performance SLOs and error budgets
- Capacity planning: from measurements to forecasts
- Right-sizing infrastructure
- Performance per dollar: infrastructure costs
- Performance incidents: diagnosing under pressure
- Design: a capacity plan for next year’s growth
Advanced performance
Module 13: CPU caches and memory performance
Write cache-friendly code and find CPU bottlenecks with hardware counters.10 lessons- CPU caches: lines, levels and misses
- Data-oriented design: cache-friendly code
- False sharing: when threads fight over a cache line
- Prefetching and memory access patterns
- Branch prediction and branchless code
- SIMD: one instruction, many values
- NUMA: near and far memory
- Hardware performance counters
- Top-down analysis: finding the CPU bottleneck
- Design: optimizing a hot loop step by step
Module 14: Multicore and lock-free programming
Scale across cores and write correct lock-free code with atomics and memory ordering.10 lessons- Multicore scaling: why more cores don’t always help
- Memory models: what each thread can see
- Atomics and memory ordering
- Lock-free data structures
- Wait-free algorithms and the ABA problem
- Read-copy-update and other reader-friendly tricks
- Sharding work across cores
- Thread-per-core architectures
- Case: LMAX and the Disruptor
- Design: building a lock-free queue
Module 15: Kernel-level profiling and high-performance networking
Profile the kernel with perf and eBPF, and tune the Linux network stack.10 lessons- Kernel-level profiling with perf
- eBPF: safe programs inside the kernel
- eBPF tools: bcc and bpftrace
- Tracing system calls and scheduler delays
- The Linux network stack and its costs
- Tuning TCP and network buffers
- io_uring: fast asynchronous I/O
- Kernel bypass: DPDK, XDP and RDMA
- Zero-copy techniques
- Design: a low-latency network service
Capstone and interviews
Module 16: Capstone: build, benchmark and optimize
Build an application, benchmark it, fix its bottlenecks and prove the gains under load.9 lessons- Capstone overview: build, benchmark, optimize
- Capstone step 1: building the application
- Capstone step 2: baseline benchmarks
- Capstone step 3: profiling under load
- Capstone step 4: code and runtime fixes
- Capstone step 5: database and I/O fixes
- Capstone step 6: distributed bottlenecks
- Capstone step 7: load and stress testing
- Capstone step 8: measuring and reporting the gains
Module 17: Performance engineering interviews
Prepare for performance testing and systems performance interviews.8 lessons- Performance engineering interviews: what’s tested
- Explaining latency and throughput clearly
- Debugging interviews: a service is slow
- Estimation and capacity interview questions
- Low-level questions: caches, threads and GC
- Common mistakes in performance interviews
- Mock interview: a slow API in production
- Mock interview: designing a load test