refactor: rename resource_manager → resource_watchdog, RM_ → RW_
Consistent naming with the watchdog family (system_watchdog, docker_watchdog). File renamed, all RM_ config variables and internal references updated to RW_ across master.conf, master_host1.conf, common.sh, docker_watchdog.sh, system_watchdog.sh, watchdog_orchestrator.sh, and sunday_morning_coffee_report.sh. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
309546e615
commit
9a5f6f88f2
+25
-25
@@ -279,7 +279,7 @@
|
||||
# Launched in order — each as a background process.
|
||||
# One-shot scripts (ramdisk, syslog, fpm, inotify, network) run and exit naturally.
|
||||
# Continuous scripts (failover) run until array stops.
|
||||
# Watchdogs (resource_manager, docker_watchdog, system_watchdog) are cronned via
|
||||
# Watchdogs (resource_watchdog, docker_watchdog, system_watchdog) are cronned via
|
||||
# watchdog_orchestrator.sh — NOT launched here.
|
||||
ARRAY_START_SCRIPTS=(
|
||||
"git_pull_execute.sh" # pull latest scripts before anything starts
|
||||
@@ -1117,7 +1117,7 @@
|
||||
# ==============================================================================================
|
||||
# ── WATCHDOG ORCHESTRATOR ─────────────────────────────────────────────────────────────────────
|
||||
# ==============================================================================================
|
||||
# Runs resource_manager → docker_watchdog → system_watchdog in sequence each cron cycle.
|
||||
# Runs resource_watchdog → docker_watchdog → system_watchdog in sequence each cron cycle.
|
||||
# Schedule: * * * * * (every minute via User Scripts plugin)
|
||||
# NOT in ARRAY_START_SCRIPTS — has its own cron entry.
|
||||
|
||||
@@ -1136,43 +1136,43 @@
|
||||
# Level 3 (hard) — docker stop optional containers, signal docker_watchdog to defer
|
||||
#
|
||||
# ── PER-HOST CONTAINER LISTS ──────────────────────────────────────────────────────────────────
|
||||
# HOST*_RM_PAUSE_CONTAINERS — docker pause at medium pressure (in master_host*.conf)
|
||||
# HOST*_RM_STOP_CONTAINERS — docker stop at hard pressure (in master_host*.conf)
|
||||
# HOST*_RW_PAUSE_CONTAINERS — docker pause at medium pressure (in master_host*.conf)
|
||||
# HOST*_RW_STOP_CONTAINERS — docker stop at hard pressure (in master_host*.conf)
|
||||
|
||||
RM_ENABLED=true
|
||||
RM_STATE_FILE="/tmp/resource_manager_state.db"
|
||||
RW_ENABLED=true
|
||||
RW_STATE_FILE="/tmp/resource_watchdog_state.db"
|
||||
|
||||
# ━━━ Pressure Thresholds ━━━
|
||||
# Graduated RAM response — resource_manager acts before system_watchdog reboots.
|
||||
# RM_RAM_SOFT_GB > RM_RAM_MEDIUM_GB > RM_RAM_HARD_GB > SYS_WATCHDOG_MEM_GB always
|
||||
RM_RAM_SOFT_GB=12 # throttle start — reduce background load
|
||||
RM_RAM_MEDIUM_GB=8 # pause background containers
|
||||
RM_RAM_HARD_GB=6 # stop optional containers (was SYS_WATCHDOG_MEM_SHUTDOWN_GB)
|
||||
RM_RAM_RECOVER_GB=20 # RAM must reach this before restoring hard-stopped containers
|
||||
# Graduated RAM response — resource_watchdog acts before system_watchdog reboots.
|
||||
# RW_RAM_SOFT_GB > RW_RAM_MEDIUM_GB > RW_RAM_HARD_GB > SYS_WATCHDOG_MEM_GB always
|
||||
RW_RAM_SOFT_GB=12 # throttle start — reduce background load
|
||||
RW_RAM_MEDIUM_GB=8 # pause background containers
|
||||
RW_RAM_HARD_GB=6 # stop optional containers (was SYS_WATCHDOG_MEM_SHUTDOWN_GB)
|
||||
RW_RAM_RECOVER_GB=20 # RAM must reach this before restoring hard-stopped containers
|
||||
|
||||
# Load average thresholds — multiplier × core count
|
||||
RM_LOAD_SOFT_MULTIPLIER=2.0 # soft pressure: 2× cores sustained
|
||||
RM_LOAD_MEDIUM_MULTIPLIER=3.0 # medium pressure: 3× cores sustained
|
||||
RW_LOAD_SOFT_MULTIPLIER=2.0 # soft pressure: 2× cores sustained
|
||||
RW_LOAD_MEDIUM_MULTIPLIER=3.0 # medium pressure: 3× cores sustained
|
||||
|
||||
# Consecutive runs at lower pressure before de-escalating
|
||||
RM_RECOVER_CYCLES=3
|
||||
RW_RECOVER_CYCLES=3
|
||||
|
||||
# ━━━ SABnzbd Throttle ━━━
|
||||
# Speed values: "50M" = 50 MB/s, "0" = unlimited
|
||||
RM_SABNZBD_ENABLED=true
|
||||
RM_SABNZBD_SPEED_SOFT="50M"
|
||||
RM_SABNZBD_SPEED_MEDIUM="10M"
|
||||
RW_SABNZBD_ENABLED=true
|
||||
RW_SABNZBD_SPEED_SOFT="50M"
|
||||
RW_SABNZBD_SPEED_MEDIUM="10M"
|
||||
|
||||
# ━━━ qBittorrent Throttle ━━━
|
||||
# KB/s — 0 = unlimited
|
||||
RM_QBIT_ENABLED=true
|
||||
RM_QBIT_DL_SOFT=51200 # 50 MB/s
|
||||
RM_QBIT_DL_MEDIUM=10240 # 10 MB/s
|
||||
RW_QBIT_ENABLED=true
|
||||
RW_QBIT_DL_SOFT=51200 # 50 MB/s
|
||||
RW_QBIT_DL_MEDIUM=10240 # 10 MB/s
|
||||
|
||||
# ━━━ Critical Containers ━━━
|
||||
# Never paused or stopped regardless of pressure level.
|
||||
# Keep DNS, auth, media serving, and live TV always running.
|
||||
RM_CRITICAL_CONTAINERS=(
|
||||
RW_CRITICAL_CONTAINERS=(
|
||||
"NginxProxyManager" # reverse proxy — internet access
|
||||
"Authelia" # auth — nothing accessible without it
|
||||
"Authelia-Secondary"
|
||||
@@ -1207,7 +1207,7 @@
|
||||
#
|
||||
# ── RAM ───────────────────────────────────────────────────────────────────────────────────────
|
||||
# SYS_WATCHDOG_MEM_GB — strike system → reboot (or OOM bypass)
|
||||
# Warn/shutdown/recover RAM tiers are handled by resource_manager.sh
|
||||
# Warn/shutdown/recover RAM tiers are handled by resource_watchdog.sh
|
||||
|
||||
# ━━━ State Files ━━━
|
||||
SYS_WATCHDOG_STATE_FILE="/tmp/system_watchdog_state.db" # /tmp — resets on reboot ✅
|
||||
@@ -1234,8 +1234,8 @@
|
||||
SYSTEM_WATCHDOG_HEARTBEAT_HOURS=1
|
||||
|
||||
# ━━━ RAM Reboot Threshold ━━━
|
||||
# Reboot trigger only — warn/shutdown/recover handled by resource_manager.sh
|
||||
# RM_RAM_HARD_GB > SYS_WATCHDOG_MEM_GB always (RM acts before watchdog reboots)
|
||||
# Reboot trigger only — warn/shutdown/recover handled by resource_watchdog.sh
|
||||
# RW_RAM_HARD_GB > SYS_WATCHDOG_MEM_GB always (RM acts before watchdog reboots)
|
||||
SYS_WATCHDOG_MEM_GB=4 # strike system → reboot
|
||||
|
||||
# ━━━ OOM Bypass Settings ━━━
|
||||
|
||||
Reference in New Issue
Block a user