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

Don't prefer processes with negative oom_score_adj #159

Closed
hakavlad opened this issue Feb 11, 2020 · 2 comments
Closed

Don't prefer processes with negative oom_score_adj #159

hakavlad opened this issue Feb 11, 2020 · 2 comments

Comments

@hakavlad
Copy link
Contributor

For example, systemd-udevd has oom_score_adj=-1000.
If I set --prefer systemd-udevd, it will get badness=300.

фев 11 21:05:09 PC earlyoom[15282]: pid   363: badness 300 vm_rss   3636 systemd-udevd
фев 11 21:05:09 PC earlyoom[15282]:     ^ new victim (higher badness)

I think it's not OK.
We can assume that this is a critical process if it has such a low oom_score_adj value, and killing it could destroy the system.

My suggestion:
Do not increase badness of processes with negative oom_score_adj. At least don't prefer processes with oom_score_adj=-1000.

@rfjakob
Copy link
Owner

rfjakob commented Feb 22, 2020

Hmm. We have to calculate oom_score_before_adjustment + 300 and use that. However, I don't see a way to get oom_score_before_adjustment:

/proc/10269$ grep . comm oom_*
comm:systemd-udevd
oom_adj:-17
oom_score:0
oom_score_adj:-1000

@rfjakob
Copy link
Owner

rfjakob commented Feb 22, 2020

I think if a user wants to have systemd-udevd killed, we will not prevent him from doing that, but I have documented the bug as 953cf95 .

@rfjakob rfjakob closed this as completed Feb 22, 2020
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

2 participants