Cheap alternative to reboot parameters (nohz, rcu, isolcpus) for stable benchmarks
When no optimized VM is available, running benchmarks on a desktop is noisy. Generally the standard fix on local machines is to optimize the machine states (gov, epp, SMT, boost, pin freq, ..), benchmark protocol with "min elapsed time" as iterations count, memory_order_acquire/release, interleaved trials and spotify turned off, while we get a new cup of coffee to leave the CPU free...
we can do better with:
\- Selecting CPUs by noise via IRQ rate and scheduler load
\- Pinning it with sched_affinity or even better by containing the task inside a cgroup
\- Pushing steerable IRQs off your selected CPUs and holding irqbalance for the run
\- Blocking the SMT siblings of the selected CPUs
But no existing tool is aligning, so i created Goset, it is an automatic taskset that stabilizes benchmark runs using only what the running kernel already exposes. It even has a remote thread that reads per-CPU counters remotely from procfs/sysfs (IPI-free): IRQ counts, throttle count, CPU freq, context switches, migrations, run delay.
The basic usage doesn't need sudo and only select threads, pin and monitor telemetry.
Request a single thread and sched_affinity:
goset -n 1 -- ./mybench
Request 4 threads, task contain in cgroup, steer IRQs and block siblings:
sudo goset -n 4 -cgroup -steer -fence -- ./mybench
PS: this is best-effort for no reboot. NMIs, LOC timer ticks and anything the kernel won't move still land on your CPUs, but it removes the biggest chunk.
What you get is the quietest placement available directly on your desktop and the telemetry that lets you compare between runs; while keeping Spotify and your best vibe-code agent still writing essays-as-comments to describe a sum.
Anyway, it is called Goset and it is at: github.com/fior512/goset
https://redd.it/1x4audg
@r_cpp
Post #25844
3