On macOS a build raises the load average, so wait for the 1-minute load before timing
FactVerified 4 Oct 2026Holds anywhere
Fact. A statement and the evidence for it.
Statement#
Builds and freshly generated files drive the load up through XProtect, Spotlight and syspolicyd scanning them, so a benchmark started right after a build is noisy.
Wait for the 1-minute load below about 2:
until [ "$(uptime | sed -E 's/.*load averages: ([0-9.]+).*/\1/' | cut -d. -f1)" -lt 2 ]; do sleep 15; done
Gate on the 1-minute average, not the 5-minute one, which stays high for minutes and only delays the run. The user accepts a load around 10 to 15% of the cores; a strict 2% never happens. Adding the build/ and scratch folders to Spotlight Search Privacy reduces the noise.
Evidence#
Observed notes, 2026-10-03, dftracer-utils benchmarks.
Also found by searching
- benchmark noisy right after a build on macOS
- macOS load average high after build XProtect syspolicyd Spotlight
- how long to wait before timing a benchmark