Alloy memory optimization:
Alloy memory optimization: drop zero-value containers + persist positions. Alloy loki.source.docker creates goroutine+buffer per container. With 91 containers, 22 were zero-value: 17 Redis sidecars (0 bytes/hr), 4 metrics-only collectors, Alloy itself. Fix: discovery.relabel rules with action=drop on container name patterns (.*-redis, exporters, alloy). Second fix: —storage.path=/var/lib/alloy/data + named volume — without this, every restart replays ALL historical logs causing Loki 400 errors. Result: 92.5% → 18.7% memory at 512MB limit.