Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve memory metrics #122

Closed
haarp opened this issue Mar 1, 2019 · 2 comments
Closed

Improve memory metrics #122

haarp opened this issue Mar 1, 2019 · 2 comments

Comments

@haarp
Copy link

haarp commented Mar 1, 2019

Right now I'm having trouble configuring earlyoom in a way that doesn't kill processes too early or too late.

Using the defaults -m 10,5 -s 10,5: If a process quickly uses a lot of memory, swapping and page thrashing starts rendering the system unusable, but earlyoom doesn't act, because it still sees a lot of free swap.

Disabling swap checks with -m 10,5 -s 100,100: Bad actors are killed reliably, although always too soon. It seems MemAvailable, which earlyoom looks at, doesn't account for pages which can be swapped out. So low MemAvailable doesn't necessarily indicate a memory-starved system.

The crux is swap. Page thrashing can render the system unusable and unrecoverable, even if lots of swap is still available. But ignoring swap isn't the right choice either, as it can make a big difference (e.g. swapping out large tmpfs stores), as long as there's no thrashing. What to do?

In my experience the system can go up to 95% used (as seen by free) before it starts acting up and threatening to become unrecoverable. Would an option that changes the metric used be a good idea? total-used seems to work for me, but it feels like a duct-tape solution. And I'm not sure what experiences others have.

Any ideas?

Thank you!

@hakavlad
Copy link
Contributor

hakavlad commented Mar 2, 2019

memory metrics

Any ideas?

https://lwn.net/Articles/759658/

You can already use https://github.com/hakavlad/nohang, it has PSI support (it needs Linux 4.20).

see also #100

@rfjakob
Copy link
Owner

rfjakob commented May 4, 2019

Yes, this should work better when earlyoom gets PSI support. Progress is tracked at #100

@rfjakob rfjakob closed this as completed May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants