10 ms·
Need? No. I havent used a swap partition since I first got a machine with 16GB RAM. I write text files for a living and its been plenty. Every year or so a p
by mixmastamyk 3y ago
Need? No. I havent used a swap partition since I first got a machine with 16GB RAM. I write text files for a living and its been plenty.
Every year or so a program (usually firefox) would spring a leak and lock up the machine for a minute or two then the OOM killer would kill it. This would have happened with or without swap; I think it's faster without?
So haven't bothered with partitions for a while. But a couple of years ago, the dists starting adding swap files by default. Ok, I thought, I won't fight it.
I do keep it reasonable, one or two gig. No problems so far. NVME is pretty darn fast, though htop says I don't really use it.
Get enough RAM for your use case, double if on one of those soldered Macs. This served me well, we had a 2013 MBP in great working condition (because I disregarded the salesbot advice and got 16gb) still works great but the recipient wanted a new M2 this year.
Personaly went with the Framework so not worried.
- fernvenue 3y ago> I write text files for a living and its been plenty. I thought write text files may need swap partition more than others?
- mixmastamyk 3y agoWhy? My text files are typically under 100k and a good editor will pull larger ones in as needed. 0% of them are larger than RAM, ~16 GB.
- RetroTechie 3y agoSame here. I've been using a desktop with 4GB RAM (considered low-end these days, many phones have that), but no swap. Doing so for years. No big issues other than the occasional website (scripts, use of top-heavy web frameworks or whatever) causing runaway RAM usage. Local apps (including some older games, electronics design stuff) run fine. Most sensible argument for using swap I've seen is a memory leak on server hardware, where having swap keeps the server at least running, buying the admin time to figure out what's going on. On my PC, if an app leaks memory, I want to see free RAM going down to the point where something will crash - asap (no swap). Giving me a good sense which app (or website) was the culprit. Not (with swap), the whole system getting slower & slower, but with a delayed fuse & much fuzzier clues about which app caused the problem. Pick workflow + OS + apps such that working set fits RAM in the machine, and be happy. If needed, change OS / apps / workflow, or add more RAM. Not: take app that needs 16 GB to run acceptable, run it on 4 GB machine, and use swap to somehow make it work while the user experience makes you cry. So, imho: no need for swap on modern machines. Unless (maybe!) it concerns an internet facing server & uptime is critical.
- fernvenue 3y agoWow, so clear instructions and conclusions, thanks!