What you will be able to do
- Design a benchmark that survives review: baseline, percentile targets, warm and cold runs, and a named binding resource.
- Run a throughput-versus-latency sweep and read the knee where the tail detaches.
- Distinguish a synthetic benchmark, a replayed workload, and a production canary - and when each is the honest one.
- Express capacity headroom in the resource that actually binds, not in a single number.
A benchmark is a promise: “this number reflects what the workload will do.” Most benchmarks break that promise by measuring the wrong thing - a warm cache, the average, a single run. This lesson closes the curriculum with the method that makes a number trustworthy, then the coverage matrix and the consolidated reference library the whole path was written from.
The benchmark that survives review
Measure a change the way a reviewer would attack it
Baseline
The same workload, same data, measured before the change
Without a baseline there is no delta - only two unrelated numbers
Percentiles
p50, p95, p99 - not the mean
The reviewer asks "whose latency?" and the mean cannot answer
Warm and cold
Two runs: buffer-warm, and after cold cache
Warm measures the plan; cold measures the storage - they are different systems
Enough runs
Repeats until the numbers are stable
One run is an anecdote - variance is part of the result
The most useful single measurement is a throughput-versus-latency sweep: increase offered load and plot latency at each point. The curve stays flat while service time dominates, then bends sharply upward at the knee - the point where queueing takes over and the tail detaches from the mean. That knee is your real capacity, and it is almost always far below “100 percent utilisation.” Capacity planning is finding the knee and planning to operate to the left of it, with the headroom that spikes and deploys need.
Three kinds of workload, and when each is honest
- Synthetic benchmark (HammerDB TPROC-C for OLTP, ostress or a custom driver for a specific query) - controlled, repeatable, honest about mechanism: “does this index change the plan?” It is not honest about your workload - the data and mix are not yours.
- Workload replay - capture a production trace and replay it against a test system. Honest about your workload shape; the honest tool for “will this upgrade regress us.” Note Distributed Replay is deprecated in 2022, so replays are usually driven through the capture-replay tools that remain or a load driver replaying the captured statements.
- Production canary - the real traffic on one node or one replica. The most honest of all, and the one you graduate to when the first two agree.
Headroom is not one number
“Are we at 60 percent capacity?” is only answerable per resource. A box can be at 40 percent CPU while its log device is at the knee. Express headroom as the margin on the binding resource - the one whose utilisation curve hits the knee first - which is exactly the resource the wait profile names. That is the whole method of the curriculum, and it is why the wait analysis came before tuning: the binding resource decides which lever exists at all.
Research coverage matrix
| Subject | Lessons | Primary sources behind it |
|---|---|---|
| Engine internals, pages, buffer pool, log | Engine internals; Writes and durability | Query-processing, pages-and-extents, transaction-log guides |
| Latency, queueing, wait analysis | Measuring performance | sys.dm_os_wait_stats reference, Query Store docs |
| Index design, seeks, covering | Index design | Index architecture and design guide |
| Statistics, histograms, CE models | Statistics and the CE | Cardinality-estimation and statistics docs |
| Parameter sensitivity, plan cache | Parameter sensitivity; Reading plans | PSP doc, query hints, Showplan reference |
| INSERT/UPDATE/DELETE, commit, durability | Writes and durability | Transaction-durability and log guides |
| Bulk load, minimal logging | Bulk loading | Minimal-logging prerequisites, BULK INSERT, recovery models |
| Locks, isolation, RCSI, version store | Locking and isolation | Locking-and-row-versioning guide, optimized locking |
| Blocking, deadlocks, latches | Blocking and latches | Blocking troubleshooting, dm_exec_requests, spinlock doc |
| PAGELATCH, PFS/GAM/SGAM, tempdb files | tempdb | tempdb doc, allocation-contention recommendations |
| Query Store, plan forcing, IQP | Query Store | Query Store monitoring, hints, IQP docs |
| MAXDOP, memory, Resource Governor | Resource governance | MAXDOP, server-memory, Resource Governor docs |
| Scale-out, RDS/EC2, storage ceilings | Scaling and the platform | AWS RDS storage and SQL Server docs |
| Benchmarking, replay, capacity | This lesson | Method synthesis; the whole reference library |
The consolidated reference library
All citations for the curriculum live here rather than on each lesson page, per the navigation design. The block below is generated from the frontmatter and groups by publisher - Microsoft for the engine internals and performance docs, AWS for the platform storage limits.
Where SQL Server sits
How this component relates to the rest of the stack. Items without a link are not covered here yet.
Deployed with
Commonly run alongside
- Windows Failover Clustering