Hacker News new | past | comments | ask | show | jobs | submit login
Linux: *Almost* Always Add Swap Space (haydenjames.io)
8 points by ashitlerferad on April 17, 2019 | hide | past | favorite | 3 comments



Counter-point, why swap is almost never required. [1] We don't have swap on over 30k servers. If you must use it, ensure it is encrypted.

[1] - https://github.com/ohdns/sysctl_and_thp_test


I don't configure my desktop machines with swap. They have a ton of memory relative to my needs. I rarely crack 10%. I could fit all of /usr in ram with gigabytes to spare. If the OOM reaper hits, it's because I really screwed up. That's the kind of thing I want to know right away anyhow.


Yes it's a tech advert blog post, don't bother.

My personal experience is that there are situations where you want to completely disable swap on Linux. Workstations/desktops with large RAM (16GB or more) can see awful swapping when it comes time to close/restart Chromium/Firefox after long periods of use, and I've seen more than one instance where some large-RAM server application which needed to be completely restarted every 24-hours or more.

Swap is usually good, but not always.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: