docs: add resource limits guide for low-RAM devices

- README: new section explaining WG_MEM_LIMIT / WG_MEMSWAP_LIMIT with
  per-RAM-tier values and host swap configuration for SBC boards
- CLAUDE.md: simplify resource limits table, drop device-specific
  measurements, reference README for per-board guidance
- .env.example: update comments with per-tier values and OOM warning

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-07 08:22:43 +02:00
parent 4d8eb01e4c
commit fc5d6209c1
3 changed files with 41 additions and 9 deletions
+9 -3
View File
@@ -17,11 +17,17 @@ WG_UI_PORT=51821
# --- OPZIONALI — Limiti risorse container (SBC) ---
# Decommenta e adatta alla RAM disponibile:
# 512 MB RAM → WG_MEM_LIMIT=128m
# 1 GB RAM → WG_MEM_LIMIT=256m (default)
# 2 GB+ RAM → WG_MEM_LIMIT=384m
# 512 MB RAM (RPi 3B) → WG_MEM_LIMIT=96m (reale: ~37 MB, 96 m è già doppio)
# 1 GB RAM (RPi 3B+) → WG_MEM_LIMIT=128m
# 2 GB+ RAM (RPi 4/5) → WG_MEM_LIMIT=256m (default)
# Tenere WG_MEMSWAP_LIMIT = WG_MEM_LIMIT per disabilitare lo swap del container.
# Su single-core (Pi Zero / Pi 1) impostare WG_CPUS=0.75.
#
# ATTENZIONE — RPi 3 con uptime lungo: il processo Node.js può crescere nel
# tempo. Con 1 GB di RAM totale e OS+Docker che occupano ~350 MB, un limite
# di 256 m lascia pochissimo margine; il kernel OOM-killa SSH prima del
# container. Usare 96-128 m e assicurarsi che lo swap host sia >= 512 MB
# (vedi CLAUDE.md §SBC per il comando).
# WG_MEM_LIMIT=256m
# WG_MEMSWAP_LIMIT=256m
# WG_CPUS=1.0