Swapping a database’s buffer pool to disk turns a memory pressure problem into a latency problem that is much harder to diagnose.
$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io----
r b swpd free buff cache si so bi bo
2 1 412008 88104 12044 188402 412 188 4102 2841
# si/so non-zero on a database host is the finding.
$ sysctl vm.swappiness
vm.swappiness = 60 # → 1, not 0
# 0 disables swap entirely and invites the OOM killer,
# which is a fast outage instead of a slow one.
Setting swappiness to 1 rather than 0 is the detail worth knowing: zero means the kernel will not swap even to avoid killing a process, which trades a gradual degradation for an abrupt one. Sizing the buffer pool so that swapping never becomes necessary is the actual fix, and the swappiness setting is a guard rail rather than a solution.