infra-swap-tuninglisted
Install: claude install-skill bitranox/bitranox-skills
# infra-swap-tuning
## Overview
Swap tuning advice is written for general-purpose servers. On a hypervisor the anonymous memory
is mostly GUEST RAM, which breaks the assumption every recommendation rests on. Measure the two
inputs that decide the numbers, then set them.
**Core principle: the compression ratio of the memory that would actually be swapped decides
whether swapping is cheap. Measure it. Do not assume it.**
## The freeze this prevents
Swap on a ZFS zvol is a deadlock: under pressure the kernel must page out, paging out re-enters
ZFS, and ZFS needs memory to finish. The result is not an OOM kill but a total userland stall.
Recognise it by what still WORKS:
| Still alive | Frozen |
|-----------------------------------------|------------------------------------------|
| ICMP (answered in softirq) | sshd - accepts TCP, never sends a banner |
| corosync / cluster membership (RT prio) | every container's userland |
| TCP connect (kernel accept queue) | all VMs |
| the kernel | anything needing an allocation or fork |
A container answering ping proves nothing: for a veth guest the HOST kernel replies. Test guest
userland with a real ssh login, not ICMP.
**The local journal will be empty.** journald writes through the same stalled path, so it stops
mid-operation with nothing logged. Look for network-shipped