d48f27701f7d46f5f66dc8ba6e2a67f7d9fddb51
xmrig's RandomX pollutes the L3 cache, making other processes appear ~3-8% busier. With a single 5% threshold for both stopping and resuming, the script oscillates: start xmrig -> cache pressure inflates CPU -> stop xmrig -> CPU drops -> restart -> repeat. Split into CPU_STOP_THRESHOLD (15%) and CPU_RESUME_THRESHOLD (5%). The stop threshold sits above xmrig's indirect pressure, so only genuine workloads trigger a pause. The resume threshold confirms the system is truly idle before restarting.
Description
Unified NixOS flake for mreow, yarn, muffin
Languages
Nix
84.6%
Python
10.7%
Emacs Lisp
2.6%
Shell
2.1%