Re:Swap, swap, swap, and bad places to work
by VectorLock on Friday August 09, 2019 @04:47PM
(#20658134)
You make a good point about swapping out unused pages, and I'd love to discover how to balance between maintaining the "fail fast" of swap-off and the ability to swap out never used paged with swap-some. While the latter would be nice to have that extra RAM its not worth the risk, in my world at least.
[ Parent
| on HN ]
Re:Swap, swap, swap, and bad places to work
by zzzcpan on Friday August 09, 2019 @05:08PM
(#20658271)
> how to balance between maintaining the "fail fast" of swap-off and the ability to swap out never used paged with swap-some
A monitoring process, like earlyoom, can do this for you. Also features like cgroups, setrlimit(), prlimit() can help. Last one can even be used to dynamically adjust memory limits per each process and avoid kernel's weird OOM behavior. This is all in accordance with fail fast, which requires monitoring processes that actually deal with all the failings.