-
Notifications
You must be signed in to change notification settings - Fork 159
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
-m, unexpected behavior? #97
Comments
earlyoom -M 220[,160] -S 180[,170] |
Remove the "[ ]", for example,
|
The "[ ]" just mean that the value is optional. I will add examples to make that clear |
Ok, thank you. What about
? |
The new optional KILL_PERCENT is confusing to users, add examples. #97
earlyoom -S 200000,100000 It is not normal. |
Strange. How much swap do you have? (output of |
swap = 0 MiB |
Well, if you have 0 swap, you cannot set -S to anything above zero. |
with swap works normal earlyoom -S 200000,100000 |
Maybe It is not well. |
Hmm, earlyoom v1.1 had a better message, but it would still exit with an error:
The error message is different in v1.2 because the parsing of the "X,Y" values is more complicated. I'll try to improve it. |
I can start earlyoom with swap: But I can not start earlyoom without swap with this options. Why? Next, If I set earlyoom with -M 220000,160000 -S 180000,170000 In /etc, it will works fine. Next I will disable swap and restart earlyoom: Here the daemon will fall! |
Hmm, should earlyoom ignore the swap settings when there is zero swap? What do you think? PS: If you restart with less RAM, the daemon will fail as well |
Only if SwapTotal = 0. |
@rfjakob Do you agree with me? |
How it can works if swap disabled. Config:
Output:
|
earlyoom -S 200000,100000 It is not normal, it should be fixed, IMHO. |
mem avail: 1110 of 5875 MiB (18 %), swap free: 0 of 0 MiB ( 0 %) Earlyoom can works with -S 200000,100000 if swap will be disabled after earlyoom starts. Why it is forbidden to start with -S 200000,100000 without swap? |
How about this
|
or this
? |
earlyoom -m 5,9 In this case I expect 9% for SIGKILL and ignore SIGTERM, not fatal error. |
earlyoom -m 5,0 In this case I expect 5% SIGTERM and ignore SIGKILL |
SIGTERM_PERCENT should be ignored if SIGKILL_PERCENT > SIGTERM_PERCENT, not daemon fails. |
Also, the documentation does not indicate what values SIGTERM_PERCENT and SIGKILL_SIZE can take (forbidden zero value and KLL can't be higher than TERM size) |
You can get a zero SIGKILL percentage by using earlyoom -m 1 so why not allow it on the command line? #97
Saying earlyoom -m 0,15 disables SIGTERM completely. Allow it. #97
These two work now: earlyoom -m 5,0 earlyoom -m 5,9 |
As stated in the man page, the preferred way to disable SIGTERM is to set SIGTERM = SIGKILL. For a better user experience, don't exit with a fatal error is the user sets it to zero or below SIGKILL, but fix the value. #97
Instead of exiting with a fatal error, ignore "-S" if there is zero swap space. #97
Startup succeeds now with 0 swap even if you pass |
About the help message, I like it how it is. I think the square brackets are the usual way to show that a value is optional. Thanks for the report, I think this is done! |
Sorry, seems like No! earlyoom -M 220000,160000 -S 180000,170000 In this case I expect -S 180000,170000, not 10% (after enable swap) |
Good practice: earlyoom -M 220000,160000 -S 180000,170000 |
Internally, earlyoom always uses percentages. I think this is good enough, and i do not want to change the internal design for this. |
You just don't want to fix the bug. |
Yes. |
And now I have even documented it: https://github.com/rfjakob/earlyoom/blob/master/MANPAGE.md#bugs |
I do not understand how this option works.
earlyoom -m 22[,20]
earlyoom v1.2-2-gb52cc56
mem total: 5875 MiB, sending SIGTERM at 22 %, SIGKILL at 11 %
swap total: 0 MiB, sending SIGTERM at 10 %, SIGKILL at 5 %
Could not lock memory - continuing anyway: Cannot allocate memory
mem avail: 3697 of 5875 MiB (62 %), swap free: 0 of 0 MiB ( 0 %)
mem avail: 3693 of 5875 MiB (62 %), swap free: 0 of 0 MiB ( 0 %)
Is it normal?
How to set 22% for SIGTERM and 20% for SIGKILL?
Explain this in more detail, please.
Another example:
earlyoom -m 22[,16] -s 18[,28]
earlyoom v1.2-2-gb52cc56
mem total: 5875 MiB, sending SIGTERM at 22 %, SIGKILL at 11 %
swap total: 0 MiB, sending SIGTERM at 18 %, SIGKILL at 9 %
Could not lock memory - continuing anyway: Cannot allocate memory
mem avail: 3659 of 5875 MiB (62 %), swap free: 0 of 0 MiB ( 0 %)
The text was updated successfully, but these errors were encountered: