-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add a warning before a process is killed #54
Comments
+1 for that. It would be cool to have a proper warning that earlyoom will act soon, so that the user can act before earlyoom must act (and data loss could happen) If it's too late though (e.g. a newly started process is eating up all resources and system would freeze in an instant), it would be best to kill instantly - or is there a way to stop a process with SIGSSTOP which would prevent data loss? Maybe something like a staggered warning would make sense, If you approach say 20% above the threshold where earlyoom acts, it sends out a warning (providing the warning messages are configured, that is). then next at 15, 10 5%... |
@revast Glad you like the idea. |
I believe the original idea behind earlyoom was to perform a SIGKILL, much like the standard oomk does, but just do it a bit earlier, before the machine has ground to a halt. So some of these ideas might be out of that scope. But that's an interesting idea to perform a SIGTERM at an earlier threshold. It might still need to be followed by a SIGKILL later, if the process doesn't close itself as requested. Also an interesting idea to perform a SIGSTOP to allow time for user interaction. I suspect rfj would want any user interaction to happen in an entirely different process. But theoretically these proposals could be hidden behind options, and the daemon and UI process could communicate through log messages and signals, or some other kind of API. If the user does decide to keep a memory-hogging process running, what would happen next? Would the user be offered the next-best process for destruction, or would earlyoom disable itself for a while? |
@rfjakob |
i installed earlyoom on arch developing ios in virtualbox (i had sometimes freezes) and it has unexpectatly straight killed my virtual box :| it might be a good idea to restructure the readme.md and make a clear bold warning at the top, anyhow a interesting project i wonder how it will corelate with the oom from facebook |
@cinatic just FYI oomd from facebook needs kernel patches, earlyoom works on stock kernels |
+1, I need low memory warning too. |
You can offer a process that will be killed when memory is low. Dialog with zenity - https://help.gnome.org/users/zenity/3.22/list.html.en
|
Such feature would duplicate any real monitoring alerting system (e.g. |
I don't think I want earlyoom to ask for user input. But having a third threshold for a warning could work without introducing too much complexity. |
Third threshold sounds good for me. Configurable (on/off, that is) warning via notify-send would be nice. |
@rfjakob When do you plan to make the third threshold? |
This will take a month or two - want to go for it? |
After earlyoom.service no longer runs as root, notifications are pretty difficult now. I plan to have make earlyoom less aggressive in killing stuff, but I won't a low memory warning. |
How about a feature that would warn me if the free memory gets close to the minimum? This way I could first try stopping the process myself.
The text was updated successfully, but these errors were encountered: