3 ms·
Windows also does a neat trick Linux lacks: automatically adding more swap, up to a limit. Systems with loads of RAM barely lose any storage to swap, but once t
by jeroenhd 22d ago
Windows also does a neat trick Linux lacks: automatically adding more swap, up to a limit. Systems with loads of RAM barely lose any storage to swap, but once they do get hit, they can get many gigabytes of swap space without user interaction. I believe macOS does it too, of course.
I'm sure there are many reasons why Linux can't do that by default, but it's a real shame.
- fc417fc802 22d agoI assume that's primarily because the stance of most distros would require something like that to be strictly opt-in. I don't know if it's possible to trigger a service based on overall swap usage? But given that the oom killer exists I don't see why it couldn't be trivially repurposed to add swap files on the fly.
- simoncion 22d ago> Windows also does a neat trick Linux lacks: automatically adding more swap, up to a limit. Given that one can have swap files, and can also use LVM LVs for swap, and given that userspace OOM killers that work way better than the built in one -for some workloads- exist, I see no reason why you couldn't have this on Linux. This comment [0] mentions a project that claims to do just that -and seems to use swapfiles to do it-, but I don't have any experience with it. FWIW, I did find the README by the original author [1] far more informative than the one written by the new maintainer. [0] <https://news.ycombinator.com/item?id=49656129 https://news.ycombinator.com/item?id=49656129> [1] <https://pqxx.org/development/swapspace/ https://pqxx.org/development/swapspace/>