uma
Member
OP
99.99% or bust
- Joined:
- Jun 2024
- Posts:
- 324
- From:
- Dublin, IE
Running 22 containers on a 2GB Contabo VPS. Debian 12, Docker CE, nothing exotic. Every night around 03:00 the OOM killer visits. : memory climbs until something critical gets axed. Usually it's Prometheus, which is deeply ironic. Current mitigation: nothing. I watch it die. Options I'm considering:
- 2GB swap file on SSD
- Zram with 50% memory allocation
- Both, because why choose suffering
The SSD is "enterprise" from OVHcloud's cheapest tier. Wear worries feel theoretical at this price point, but I've been burned before. Status page would go red if I lose this node. Alert fatigue is real; I already mute the disk-full warnings. Anyone running similar density on 2GB? But I need more graphs. What's your swap strategy?
436 days. reboot is surrender.
kate3
Member
- Joined:
- Jul 2024
- Posts:
- 208
- From:
- Utrecht, NL
Swap on SSD is fine. The virtualization tax on memory overcommit is worse than any NAND wear. Your real problem is cgroup limits—Docker defaults are permissive.
Set memory.limit_in_bytes per container. Without limits, one leaky microservice consumes the host. I've seen OpenVZ nodes collapse from this; KVM at least isolates properly.
Zram trades CPU for compressed RAM. On low-end hosts the CPU cost is measurable. Swap + zram together is just panic layered on panic.
Virtualization tax applies to your monitoring stack too. Run Prometheus with --storage.tsdb.retention.time=2h or move it off-node.
virsh list --all | wc -l: 47
SingaporeRep
Member
Benchmark Addict
- Joined:
- Jul 2024
- Posts:
- 227
- From:
- Singapore, SG
Fio --randread --bs=4k --iodepth=64 --runtime=60
OVHcloud €3 tier: IOPS=4.2k, BW=17MB/s
Contabo €2.5: IOPS=8.1k, BW=32MB/s
local NVMe ref: IOPS=85k, BW=340MB/s
Decent disk IO, meh network
Swap on Contabo SSD = 32MB/s compressed. Zram on 2GB = ~160MB/s effective if 5:1. CPU overhead 15-20% on single-core VPS.
- Zram alone: faster, eats CPU
- Swap alone: slower, zero CPU
- Both: zram first, swap fallback = optimal for your case
Run the benchmark yourself. Numbers beat theory.
fio, iperf, geekbench. results or gtfo.