From 0289ce0856422241317404145d5d9ac4ea28fe30 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 15 Apr 2026 18:08:15 -0400 Subject: [PATCH] xmrig-auto-pause: tweak resume_threshold --- services/monero/xmrig-auto-pause.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/monero/xmrig-auto-pause.nix b/services/monero/xmrig-auto-pause.nix index 3c0190c..80107a5 100644 --- a/services/monero/xmrig-auto-pause.nix +++ b/services/monero/xmrig-auto-pause.nix @@ -26,11 +26,12 @@ lib.mkIf config.services.xmrig.enable { environment = { POLL_INTERVAL = "3"; GRACE_PERIOD = "15"; - # This server's background services (qbittorrent, monero, bazarr, etc.) - # produce 5-14% non-nice CPU during normal operation. Thresholds must - # sit above that noise floor. + # Background services (qbittorrent, bitmagnet, postgresql, etc.) produce + # 15-25% non-nice CPU during normal operation. The stop threshold must + # sit above transient spikes; the resume threshold must be below the + # steady-state floor to avoid restarting xmrig while services are active. CPU_STOP_THRESHOLD = "40"; - CPU_RESUME_THRESHOLD = "30"; + CPU_RESUME_THRESHOLD = "10"; STARTUP_COOLDOWN = "10"; STATE_DIR = "/var/lib/xmrig-auto-pause"; };