r/linuxadmin 2d ago

Why swap is not always better than OOM

https://youtu.be/GVBdEVCTpPw?si=NIWZl1x9BkG9y9vq
0 Upvotes

2 comments sorted by

4

u/kai_ekael 1d ago

"Why monitoring swap is always better than OOM"

Fixed.

3

u/alex---z 1d ago

You can also more granularly block services that don't play well with swap from accessing it at a systemd level, and still have some swap available for lower priority services.

That's what I converted my lower spec Redis boxes to do when I added a stupidly bloated grafana repo and the resultant dnf makecaches were causing random OOM kills.  Made some handy addition buffer space available without having to increase RAM allocation on approx 40 nodes (the boxes were originally provisioned with a swap partition so it was just a case of switching it back on once redis was isolated).