Stop Thrashing Under Memory Pressure: Practical zram + systemd-oomd on Linux

When a homelab box or small VPS runs out of free RAM, the failure mode is rarely a clean kill. More often the machine spends minutes thrashing: anonymous pages bounce to a slow disk swap, the page cache collapses, SSH becomes sticky, and then the kernel OOM killer finally fires.

Two complementary tools fix different halves of that story:

zram — a compressed block device in RAM, usually used as high-priority swap so reclaim stays in memory instead of on disk.

systemd-oomd — a userspace OOM daemon that watches cgroup v2 pressure stall information (PSI) and kills a descendant cgroup before the whole host livelocks.