3 ms·
My practical experience is that Linux absolutely needs swap to work well. It doesn't need a lot, but some. I had a ton of OOMs even though the memory wasn't "fu
by marginalia_nu 5y ago
My practical experience is that Linux absolutely needs swap to work well. It doesn't need a lot, but some. I had a ton of OOMs even though the memory wasn't "full" on the machine running my search engine. The machine had like dozens of gigabytes in "buff/cache" that could be reclaimed, but for some reason it failed and let loose the OOMKiller instead.. I added 512 Mb of swap and it just went away overnight. I've since increased the allocated memory by a lot more than 512 Mb.
- Oxodao 5y agoWhile I would not remove the swap on a production machine just to be safe, I've been running my home computers for ~5 years exclusively on Linux without swap. I've never encountered any of those issues for some reasons
- marginalia_nu 5y agoI usually don't have swap on my workstations either, which is why I initially thought I could get away with it on my server. Probably different usage patterns. I routinely memory map something like half a terabyte of data on this machine. Might also be due to huge pages, that feature seems a bit janky to be honest.