Profiling and Benchmarking 101
summary
Explains a concrete workflow: read production metrics (New Relic, Skylight, Scout), profile the problematic action in development, then isolate and micro/macro benchmark the hot spot with real‑like data. Demonstrates tools and tradeoffs — StackProf and ruby-prof for sampling vs tracing, benchmark-ips with rack-mini-profiler and memory_profiler for iterations and allocations — and gives surprising numbers (Apollo-style 13% extra load, 1201/1202 alarms, 90% duty cycles) to show what actually breaks and what fixes measurably work.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:18CLOUD Pain Free Rails 66 Deployments
- 1:22FLIGHT PLAN Why Measure? Benchmarking vs. Profiling Profiling Jumpstart Benchmarking Jumpstart
- 2:11The APOLLO GUIDANCE COMPUTER
- 5:53BAILOUT No available core sets
- 8:53APOLLO: the ultimate "TESTING IN PROD"
- 10:37WE are not COMPILERS
- 11:11ALL PERFORMANCE WORK WITHOUT MEASUREMENT is PREMATURE
- 12:17A BENCHMARK is a SYNTHETIC MEASUREMENT of the RESOURCES or TIME consumed by a defined PROCEDURE
- 13:12A PROFILE is a STEP BY STEP ACCOUNTING of the RELATIVE CONSUMPTION of RESOURCES by a procedure's many SUBROUTINES
- 16:32PROFILING answers "WHAT'S SLOW?"
- 17:29PROFILING ENVIRONMENT
- 20:39CPU WALL
- 22:09STATISTICAL TRACING
- 23:20STACKPROF RUBY-PROF
- 25:56TRY DIFFERENT VIEWS/FORMATS
- 26:35rack-mini-profiler
- 26:58MICRO MACRO APP
- 30:57WARMUP long enough for STABLE RESULTS
- 32:33BENCHMARK TIME should be long enough FOR LOW VARIANCE
- 34:00benchmarks
- 35:08READ PRODUCTION METRICS PROFILE TO FIND HOTSPOTS CREATE BENCHMARK ITERATE DEPLOY
- 37:07FAIL GRACEFULLY DON'T PREDICT THE FUTURE STUDY AND REPLICATE THE PAST
related talks
51mProduction Profiling: What, Why and How
29mHow to Performance
30mRails Performance monitoring: A primer for developers
26mRails Performance Monitoring 101: A Primer for Developers
44mPanel: Performance... performance
45mRails Performance Monitoring 101: A Primer for Junior Developers
01h 03mThe performance loop—A practical guide to profiling and benchmarking
01h 00mThe Basics of Profiling
