no description only meoww


Apparently memory pressure causing computers to fall over by thrashing is a solved problem. Cool. This is useful to my interests because an unimportant service I maintain at work has fallen over a couple of times and I would like to encourage that to not happen.

Here's some results from some people implementing a userspace OOM killer and resource control on Linux in which misbehaved programs cause brief minor service degradation but don't take down the box: https://facebookmicrosites.github.io/cgroup2/docs/fbtax-results.html

In my hacking, I learned about how swap is useful to treat every type of memory usage equally. This is somewhat counterintuitive, but cold ephemeral mappings are significantly less useful to keep in memory than hot disk pages. In the absence of swap, these aren't well prioritized: when there's memory pressure, the kernel may be forced to flush disk pages even if this is a bad idea, but the memory cannot be, even if it's cold.

See: https://chrisdown.name/2018/01/02/in-defence-of-swap.html


You must log in to comment.