Comments (8)
oomd doesn't help you in the case described in https://lkml.org/lkml/2019/8/4/15
from oomd.
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.
Closing b/c this will be a wontfix. We can further discuss here if you want here.
from oomd.
May be it should be documented.
Updating the docs now
from oomd.
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.
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.
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.
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)
- doesn't kill cgroup, unable to set xattr trusted.oomd_ooms=1 HOT 5
- How do I set oomd to kill process instead of cgroup? HOT 2
- /sys/fs/cgroup is not a valid cgroup2 filesystem HOT 4
- man page should be located in man8, not in man1 HOT 1
- Possibility to abstract the stat collector HOT 1
- error: call to β__open_missing_modeβ declared with attribute error: open with O_CREAT or O_TMPFILE... HOT 1
- prekill_hooks to run a shell script
- KillMemoryGrowth-inl.h: misleading ologKillTarget message for SIZE_NO_THRESHOLD
- KillMemoryGrowth<Base>::get_ranking_fn() should be SEGV safe
- Inefficient TryToKillSomething(): ranking gets made twice for a single run
- memleaks ??? HOT 2
- Prevent specific app to kill - doubt HOT 1
- Oomd
- Cgroup1
- No timestamps in oomd output HOT 1
- Meson build fails due to dumpKillInfo HOT 3
- what does the Senpai plugin used for? HOT 1
- Verifying if Senpai Config is Correct
- Uan HOT 4
- Show: lib to parse proc/cgroup data as json HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oomd.