To be clear, I don’t blame the poster of this comment at all for the content of their post – this is accepted as “common knowledge” by a lot of Linux sysadmins and is probably one of the most likely things that you will hear from one if you ask them to talk about swap. It is unfortunately also, however, a misunderstanding of the purpose and use of swap, especially on modern systems.

  • zero_spelled_with_an_ecks@programming.dev
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    4 months ago

    Without swap: The OOM killer is triggered more quickly as anonymous pages are locked into memory and cannot be reclaimed.

    This is why I prefer no swap on servers. I want oom to kill things quickly, otherwise everything slows to a crawl including ssh and terminal sessions that I’d use to troubleshoot and kill things myself anyway. I have redundant servers so a down system is much less disruptive than a terminally slow system.