Coder Social home page Coder Social logo

Comments (8)

hakavlad avatar hakavlad commented on July 19, 2024

oomd doesn't help you in the case described in https://lkml.org/lkml/2019/8/4/15

from oomd.

danobi avatar danobi commented on July 19, 2024

PSI based oom killing doesn't work well without swap. Without swap, the system runs out of physical memory too fast and enter the "death spiral" before oomd has time to react.

With swap on, the system will get slowed down with swapping anonymous pages for long enough for oomd to react. In general, having swap on non-latency-critical systems is pretty good. Here's an excellent article by my colleague: https://chrisdown.name/2018/01/02/in-defence-of-swap.html .

from oomd.

danobi avatar danobi commented on July 19, 2024

Closing b/c this will be a wontfix. We can further discuss here if you want here.

from oomd.

danobi avatar danobi commented on July 19, 2024

May be it should be documented.

Updating the docs now

from oomd.

hakavlad avatar hakavlad commented on July 19, 2024

PSI based oom killing doesn't work well without swap

Just don't use PSI-based oom killing without swap, use MemAvailable-based oom killing instead.

from oomd.

hakavlad avatar hakavlad commented on July 19, 2024

runs out of physical memory too fast and enter the "death spiral" before oomd has time to react

It shows the next problem: min interval is 1 sec.
For example, earlyoom has intereval 0.1 - 1 sec (and tiny CPU usage), it is enough to handle "runs out of physical memory too fast" and prevent system hang or OOM condition.

from oomd.

hakavlad avatar hakavlad commented on July 19, 2024

With swap on, the system will get slowed down

This is the main reason why many do not use swap. If you want to get a full-time responsive desktop, turn off the swap and use earlyoom (oomd is worst desktop solution regardless of swap availability).

from oomd.

danobi avatar danobi commented on July 19, 2024

PSI based oom killing doesn't work well without swap

Just don't use PSI-based oom killing without swap, use MemAvailable-based oom killing instead.

That might work for simple workloads, but IMO this is a local optimum. For example, how would this work with cgroups that reserve chunks of memory via memory.min? What if a host is configured with a high min_free_kbytes? What if the host runs out of MemAvailable memory but there's a lot of reclaimable memory in use (eg page cache)? Granted, these sorts of things are generally not a concern on desktop linux systems. Mostly server workloads.

If you really want, oomd can also support this. We can write a MemoryAvailable plugin. You don't have to use the pressure based plugins in your config.

This is the main reason why many do not use swap. If you want to get a full-time responsive desktop

I don't believe this is true, especially on modern systems with SSDs. This may have been true in the 90's and early 2000s. Swap these days usually leads to more equitable memory management. For example, dirty pages can always be flushed but anonymous memory is essentially mlock'd without swap. With swap the system can swap out cold anon pages and leave more room for hot pages in main memory.

from oomd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.