this post was submitted on 06 Jul 2024
97 points (94.5% liked)

Linux

5276 readers
580 users here now

A community for everything relating to the linux operating system

Also check out [email protected]

Original icon base courtesy of [email protected] and The GIMP

founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] zero_spelled_with_an_ecks 5 points 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.