Every performance dispute in this course follows one method. Freeze the workload and envelope, run exactly one experiment, then replay to confirm.
Freeze the workload revision, input, run window, frequency state, and collection method.
Record trusted counters and attribute slots top-down with one dominant hypothesis.
Run one experiment that moves only that hypothesis, with a stated expected delta.
Replay the baseline and the experiment, then keep or reject the hypothesis.
Write the memo with gain range, rollback trigger, and secondary-bottleneck forecast.
Changing two knobs at once teaches nothing. One experiment per hypothesis keeps attribution intact.
Counter sampling collects periodic snapshots instead of exact counts. A fixed period of 100k cycles over a 1e9-cycle run yields 1e9 / 1e5 = 10,000 samples.
Sampling has skid: the recorded instruction pointer trails the event by a few cycles. Treat hot-spot attribution as approximate and confirm small regions with exact counts.
Practice | Rule | Why |
|---|---|---|
Fixed period | State period and total samples | 10,000 samples support breakdowns; 10 do not |
Phase tags | Split warmup, steady state, and teardown | Averages across phases hide the bottleneck |
Trace slices | Correlate one counter claim with one timeline slice | Aggregate telemetry must explain timeline behavior |
Locked envelope | Same frequency and thermal state across runs | Drift between envelopes looks like architecture |
A memo records the decision, not the data dump. It names the dominant limiter, the falsification evidence, the chosen fix, and the regression checks.
Field | Example entry |
|---|---|
Dominant limiter | Backend memory, 20 of 100 slot points |
Competing hypothesis | Backend core pressure, rejected by halved working set replay |
Expected gain | 0.2 to 0.5 IPC, bounded by the 0.8 ceiling |
Rollback trigger | p99 latency regresses more than 3 percent on the holdout mix |
Secondary forecast | Frontend bound becomes dominant past 1.9 IPC |
Owner | Named owner and replay date |
Freeze the workload revision and runtime envelope, then compare counter and trace deltas against the last known-good run. No knob moves before baseline alignment.
Recompute the bottleneck ranking first. Removing one limiter exposes the next constraint, so the old ranking is stale.