-
-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
earlyoom service: Cannot configure second part of -m/-s parameters #83504
Comments
It seems they changed the behavior of the flag: rfjakob/earlyoom@bcd1ad4. |
@ljli I also liked the old behaviour much better, but I think it would be extra confusing to deviate from upstream's defaults. Would you be up to implementing
? And then we would add extra documentation to highlight
and point out what you have to set to get the old behaviour back. |
Hello, I'm a bot and I thank you in the name of the community for opening this issue. To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them. Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel. |
Still relevant |
I marked this as stale due to inactivity. → More info |
* nixos/earlyoom: bring the module up to date Removes deprecated option `ignoreOOMScoreAdjust`, introduces `killHook` as a replacement for `notificationsCommand`, and adds an `extraArgs` option for things not covered by the module. * nixos/earlyoom: add nixos test * nixos/earlyoom: add reportInterval Allows setting the interval for logging a memory report. Defaults to 3600 following upstream (https://github.com/rfjakob/earlyoom/blob/master/earlyoom.default#L5) to avoid flooding logs. * nixos/earlyoom: add free{Mem,Swap}KillThreshold Fixes #83504
Issue description
The
earlyoom
module requirestype = int
:nixpkgs/nixos/modules/services/system/earlyoom.nix
Lines 20 to 29 in 7401afc
but in fact it can be given docs
so e.g.
-m 10,5
to configureKILL_PERCENT
.That means the
KILL_PERCENT
setting is currently not configurable in NixOS.It is very important to configure it, because as written:
That means earlyoom will only start terminating processes after a large amount of swap is full, which can take forever to happen, thus defeating a major point of earlyoom. (You can work around that by completely disabling swap, but then you can't suspend-to-disk either.)
Even if you set
freeSwapThreshold = 100
, that will translate to to-s 100,50
by default, so that's 50% of swap filled!This is why we need to allow the user to configure
KILL_PERCENT
, so that they can set it to an impactful value like-s 100,100
.We will have to change away from
type = int
, probably to accept bothint
andstring
for backwards compatibility.Steps to reproduce
Set up
earlyoom
with swap, run out of memory, see your system freeze.Technical details
19.09 (same for current
master
).CC @wedens @ljli as past contributors.
The text was updated successfully, but these errors were encountered: