diff --git a/proxmox/README.md b/proxmox/README.md index 2d2392a..7237f91 100644 --- a/proxmox/README.md +++ b/proxmox/README.md @@ -23,7 +23,7 @@ proxmox/ │ └── README.md # Servere Minecraft, gestionare Java, cum actualizezi versiunea │ ├── lxc102-docker/ # LXC 102 - Docker + Portainer + Docker Sandboxes (sbx) -│ └── README.md # Componente, comenzi sbx, depanare "failed to run sandbox container" +│ └── README.md # Componente, comenzi sbx, depanare "failed to run sandbox container", memorie/OOM │ ├── lxc103-dokploy/ # LXC 103 - Dokploy + Traefik (Deployment Platform) │ ├── README.md # Configurare, arhitectură, workflow deploy @@ -175,6 +175,10 @@ ssh root@10.0.20.201 "pct exec 102 -- su - work -c 'sbx ls'" > `/home/work/.local/state/sandboxes/sandboxes/sandboxd/daemon.log` (`sbx diagnose` trece oricum). > Vezi secțiunea de depanare din `lxc102-docker/README.md`. +> **Memorie:** ridicat la 12GB + 4GB swap pe 2026-07-31 după OOM-uri cronice — baseline-ul +> e ~1.9GB (sbx + VS Code Remote + Claude) chiar fără sandbox-uri active, iar un sandbox +> real mai adaugă ~1.9GB. Vezi `lxc102-docker/README.md` → „Memorie". + --- ### LXC 103 - Dokploy + Traefik (Deployment Platform) diff --git a/proxmox/cluster/README.md b/proxmox/cluster/README.md index 201c4cb..be8f6d5 100644 --- a/proxmox/cluster/README.md +++ b/proxmox/cluster/README.md @@ -224,21 +224,36 @@ pct set --rootfs local-zfs:20 ### VM-uri și Containere Active -#### LXC Containers (Proxmox pvemini - 10.0.20.201) -| VMID | Nume | IP | CPU | RAM | Storage | Status | Tags | -|------|------|-----|-----|-----|---------|--------|------| -| 100 | portainer | 10.0.20.170 | 2 cores | 1 GB | 21 GB | running | docker;portainer | -| 102 | coolify | - | 4 cores | 6 GB | 50 GB | stopped | debian | -| 103 | dokploy | 10.0.20.167 | 2 cores | 2 GB | 10 GB | running | docker;deployment | -| 104 | flowise | 10.0.20.161 | 4 cores | 2 GB | 100 GB | running | flowise;ollama | -| 106 | gitea | 10.0.20.165 | 2 cores | 4 GB | 250 GB | running | alpine;community-script;docker;gitea | -| 108 | central-oracle | 10.0.20.121 | 2 cores | 4 GB | 50 GB | running | docker;oracle | +> Regenerat din date live 2026-07-31 (`pvesh get /cluster/resources --type vm`). + +#### LXC Containers + +| VMID | Nume | Nod | IP | CPU | RAM | Storage | Status | +|------|------|-----|-----|-----|-----|---------|--------| +| 100 | portainer | pvemini | 10.0.20.170 | 2 cores | 4 GB | 20 GB | running | +| 102 | docker.romfast.ro | pvemini | 10.0.20.113 | 4 cores | 12 GB | 30 GB | running | +| 103 | dokploy | pvemini | 10.0.20.167 | 2 cores | 4 GB | 50 GB | running | +| 104 | flowise | pvemini | 10.0.20.161 | 4 cores | 8 GB | 100 GB | running | +| 106 | gitea | pvemini | 10.0.20.165 | 2 cores | 4 GB | 250 GB | running | +| 108 | central-oracle | pvemini | 10.0.20.121 | 2 cores | 8 GB | 50 GB | running | +| 171 | claude-agent | pvemini | 10.0.20.171 | 4 cores | 16 GB | 32 GB | running | +| 101 | minecraft | pve1 | - | 4 cores | 8 GB | 100 GB | running | +| 110 | moltbot | pve1 | 10.0.20.173 | 6 cores | 8 GB | 50 GB | running | +| 301 | docker-portainer-template | pveelite | - | 2 cores | 8 GB | 100 GB | stopped | #### Virtual Machines (QEMU) -| VMID | Nume | IP | CPU | RAM | Storage | Status | Descriere | -|------|------|-----|-----|-----|---------|--------|-----------| -| 201 | roacentral | DHCP | 2 cores | 4 GB | 500 GB | running | Windows 11 - Client pentru aplicații | -| 300 | Win11-Template | - | 2 cores | 4 GB | 500 GB | stopped | Windows 11 Template pentru clonare | + +| VMID | Nume | Nod | IP | CPU | RAM | Storage | Status | +|------|------|-----|-----|-----|-----|---------|--------| +| 201 | roacentral | pvemini | 10.0.20.122 | 4 cores | 6 GB | 500 GB | running | +| 303 | Win11-Adina | pvemini | DHCP | 4 cores | 8 GB | 500 GB | running | +| 300 | Win11-Template | pvemini | - | 2 cores | 4 GB | 500 GB | stopped | +| 302 | oracle-test-302 | pvemini | - | 4 cores | 4 GB | 500 GB | stopped | +| 109 | oracle-dr-windows | pveelite | 10.0.20.37 | 4 cores | 6 GB | 500 GB | stopped | + +> **Notă memorie:** valorile sunt *limite*, nu rezervări — LXC-urile consumă doar cât +> folosesc. Suma nominală depășește RAM-ul fizic al nodurilor, ceea ce e normal. Vezi +> `../lxc171-claude-agent/README.md` → „Memorie & OOM" pentru starea swap-ului pe noduri. --- diff --git a/proxmox/cluster/incidents/2026-07-31-lxc110-dns-tailscale-oom.md b/proxmox/cluster/incidents/2026-07-31-lxc110-dns-tailscale-oom.md index 19400ac..c904cd1 100644 --- a/proxmox/cluster/incidents/2026-07-31-lxc110-dns-tailscale-oom.md +++ b/proxmox/cluster/incidents/2026-07-31-lxc110-dns-tailscale-oom.md @@ -189,3 +189,12 @@ Verificat post-aplicare: ambele `active/running`, porturile 7788 + 7789 deschise **Legături:** `../../lxc110-moltbot/README.md` · `../../lxc171-claude-agent/README.md` (secțiunea „Memorie & OOM" — incidentul zram pvemini 2026-06-24) + +> **Al doilea OOM în aceeași zi, alt container, alt mecanism:** LXC 102 (docker/sbx) a +> generat alertă „OOM x2 on pvemini" la 09:36. Acolo host-ul avea swap funcțional — pur și +> simplu containerul era subdimensionat (4GB pentru sbx + VS Code + Claude). Ridicat la +> 12GB. Detalii: `../../lxc102-docker/README.md` → „Memorie". +> +> **Numitorul comun al ambelor cazuri:** OOM **local unui cgroup de container**, deși host-ul +> avea marjă largă, plus victime alese după `oom_score_adj` (procese mici, irelevante) care +> ascund adevăratul consumator. Primul reflex: citește `oom_memcg=` din mesajul kernel. diff --git a/proxmox/lxc102-docker/README.md b/proxmox/lxc102-docker/README.md index 1cdddca..a52b39d 100644 --- a/proxmox/lxc102-docker/README.md +++ b/proxmox/lxc102-docker/README.md @@ -17,7 +17,7 @@ | IP intern | 10.0.20.113 | | Host Proxmox | pvemini | | Storage | local-zfs (30GB) | -| RAM | 4GB (swap 512MB) | +| RAM | 12GB (swap 4GB) — ridicat de la 4GB/512MB pe 2026-07-31, vezi „Memorie" | | CPU | 4 cores | | OS | Debian 13 (trixie) | | Features | `nesting=1,fuse=1` | @@ -139,6 +139,59 @@ Verificare finală: `sbx create opencode .` → sandbox `running`, iar în inter --- +## Memorie — OOM cronic pe 4GB (rezolvat 2026-07-31) + +Alertă pe email „OOM x2 on pvemini", cu procese mici ucise (`dbus-daemon`, +`oom_score_adj:200`) — derutant, pentru că victimele nu sunt vinovatul. Mesajul kernel dă +containerul real: `oom_memcg=/lxc/102`. **OOM local containerului**, NU presiune de host — +pvemini avea 24 Gi disponibili și zram funcțional. + +### Bugetul real (măsurat, cu ZERO sandbox-uri active) + +| Proces | RSS | +|--------|-----| +| `sbx daemon start` | ~863 MB | +| `claude` | ~317 MB | +| VS Code Remote-SSH (5 forks) | ~450 MB | +| tailscaled + dockerd + containerd + portainer | ~205 MB | +| **Baseline** | **~1.9 GB** | + +Cu limita veche de 4096 MB, pornirea unui sandbox real (`containerd-shim` observat la +**1.9 GB**) ducea totalul la ~3.8 GB → plafon atins → cascadă de OOM-kill. Contoare cumulate +la momentul incidentului: `oom_kill 24`, `max 9279` depășiri de `memory.high`, +`memory.peak` fix pe limită. Swap-ul de 512 MB era epuizat complet (510/512). + +> **`sbx daemon` NU are memory leak.** RSS-ul urcă la ~863 MB în timpul pornirii și apoi se +> plafonează (verificat prin eșantionare la 10s timp de un minut). O citire de ~335 MB +> înseamnă doar că l-ai prins în mijlocul startup-ului, tipic după un kill. + +### Fix aplicat + +```bash +ssh root@10.0.20.201 "pct set 102 --memory 12288 --swap 4096" # live, fără restart +``` + +Limita cgroup **nu rezervă** memorie — containerul consumă doar cât folosește. Verificare: + +```bash +pct exec 102 -- free -h # 12Gi total +cat /sys/fs/cgroup/lxc/102/memory.events # oom_kill nu mai crește +``` + +Contoarele din `memory.events` sunt cumulate de la pornirea containerului, deci valorile +vechi rămân afișate — ce contează e că nu mai cresc. + +### De reținut + +- LXC 102 **nu e „doar Docker"**: rulează sbx (sandbox-uri agenți AI) + VS Code Remote + + Claude, toate sub userul `work`. Dimensionează-l ca mediu de dezvoltare, nu ca host Docker. +- La orice OOM pe pvemini, citește **`oom_memcg=`** din mesajul kernel înainte de orice + altceva — host-ul are marjă, deci aproape sigur e un cgroup de container. +- Caz înrudit în aceeași zi, cu alt mecanism (swap fictiv fără backing pe host): + `../cluster/incidents/2026-07-31-lxc110-dns-tailscale-oom.md` + +--- + ## Fișiere și căi importante | Cale | Conținut |