TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #25844 3
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
GitHub GitHub - fior512/goset: Noise-aware CPU pinning Noise-aware CPU pinning. Contribute to fior512/goset development by creating an account on GitHub.
More from @r_cpp
  1. Oct 12, 2026[Release] slick-logger v2.2.0 — Lock-free asynchronous C++20 logging with multi-process sh…
  2. Oct 12, 2026This C++ drama is crazy - Adobe votes no https://www.youtube.com/watch?v=DEqx_NMMH9Q https…
  3. Oct 12, 2026FastNoise2: noise generation using SIMD and C++17 https://github.com/Auburn/FastNoise2 htt…
  4. Oct 12, 2026New C++ Conference Videos Released This Month - October 2026 (Updated To Include Videos Re…
  5. Oct 12, 2026cxvm: pin a GCC or Clang version per project on Linux (pyenv/nvm, but for C++ compilers) I…
  6. Oct 12, 2026cppreference-doc for Qt Creator Release cppreference C++ v2025.12.01 · cristianadam/cppref…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →