Installing earlyoom by default #1052
Replies: 11 comments 77 replies
-
Don't want it. Don't even use swap.
|
Beta Was this translation helpful? Give feedback.
-
Even with 32 gb of RAM, I occasionally launch processes that easily eat it all up. I believe that this would address, even if not in a correct way, a very common complaint in Linux systems, making Linux mint more user friendly (apps closing instead of freezing the entire system) currently, the default OOM doesn't kick in if the process is launched in user space, or it does very slowly, taking several minutes which can be very frustrating and cause productivity loss when you have several programs open. I don't think programs have to lose data if they are sent SIGTERM first. |
Beta Was this translation helpful? Give feedback.
-
Ive watched the comments through the day, but there is one consideration that people are overlooking. If a n00b or gamer were to experience this kind of runaway memory issue, the program would just crash violently after locking everything up for a time. How would they know where to look? There is the DBUS GUI notifier and the log (plus I feel OPs initial proposal is worth consideration. It has merit in the form of making system management easier for new users - which can be terribly intimidating. |
Beta Was this translation helpful? Give feedback.
-
Do you guys ever run long/heavy tasks like video encoding etc? |
Beta Was this translation helpful? Give feedback.
-
Have you considered making any install of earlyoom flash a BIG message on the screen saying "You are about to install software that may terminate user programs without warning". If you have "(only 10% RAM, and 5% swap left)" left, Linux may be happily maximising its RAM usage for buffers etc when this earlyoom launches and terminates a vital program. Since the ideal killee is the largest process, it seems likely that it is a rather important one. |
Beta Was this translation helpful? Give feedback.
-
I think we need to calm down a bit. Lets stick to the problem. From my experience, an earlyoom would have been an absolute god-send on many occasions. - e.g 1: I was the maintainer of the old Planet Mirror system. It was a colossus back in the day. Our data centre (our own!) was RAMMED with 1U/2U servers (forward proxies), some 4U bulk management machines and endless storage arrays. We had many situations where the core 4U's were overrun with traffic. It was hectic. There were a few nightmare situations where one of the two core management units were saturated. Our only choice was a hard restart and it ALWAYS ended in grief. It was a diabolical situation. Earlyoom would have saved us DAYS of fixups. - e.g 2: I was CTO of a childrens maths competition. It was a worldwide event involving millions of children all competing on a single day. The traffic was INSANE. The databases were smashed, the front-end units were smashed and the data management servers were smashed. Yes, this was before the cloud became a thing.... but earlyoom would have been an absolute saviour on many occasions. Sometimes things are bigger than a single users "video encoding" crashes. Mint is used in a myriad of situations, not just home PCs'. Another example, I consult on Linux issues to business and the number of times an office PCs will seize up because some numbskull did something sublimely stupid is beyond count. Earlyoom would save businesses hundreds of hours in lost production, frustration and IT callouts. My suggestions are these:
|
Beta Was this translation helpful? Give feedback.
-
One assumption not being examined here is the matter of "locking up" the system. The system is not supposed to lock up when it runs out of RAM. At the very least, applications that try to allocate RAM should get an error from the system and report that to the user. In other words, things are supposed to fail gracefully. What I am driving at here is that, if the system is actually put in a state where it cannot be used, then there is a serious problem with memory being overwritten, and that, I should think, is a kernel bug to be addressed. If this is a reproducible situation, then it should be reported. I see two possibilities: first, the kernel is messing up RAM itself and putting itself in an inconsistent state. This is not good, and should be addressed at the kernel level. Second, an app is messing up so badly it is putting the kernel in an inconsistent state. This is not supposed to be able to happen, so all the more reason for it to be addressed at the kernel level. So these are the considerations that have been coming to mind as I've been watching this thread. What do you all think? Am I missing something? Is there more to the picture? |
Beta Was this translation helpful? Give feedback.
-
Another thought occurred to me while mulling this debate over lunch. If this OOM thing weren't a problem, across all Linuxen in all forms, why did "the they" bother to put an OOM killer into the kernel? i.e. its a real, persistent problem. Rare, thankfully, but it exists. One counterargument goes along the lines of "report the bug" but it has been shown over the decades that bugs can be obscure, no one cares, it affects only a minority, transient, or there is no real fix. Kernel issues triply so. Having an OOM manager in place mitigates against turning ones computer into a useless brick. The cost of this management option is non-existent. The argument of where it belongs (kernel vs. Userspace) is also specious, for the only question is "does it work as intended". The answer is a categoric YES. |
Beta Was this translation helpful? Give feedback.
-
I acknowledge the long history of the Linux OOM problem, and have experienced it many times. IMO: an OS that cannot gracefully handle OOM is literally not an "Operating System". So, I still use the hard reset button on my system occasionally for this very reason. Software should never crash the hardware. |
Beta Was this translation helpful? Give feedback.
-
Has anyone tried nohang which seems to have more features and more customizability compared to earlyoom? |
Beta Was this translation helpful? Give feedback.
-
I have a story that might help relate the the issue at hand. I've been asked to re-purpose some old iMacs that were used industrially in a busy industrial studio (dust, noise, horror, etc). They ran mostly Chrome and AutoCAD for the CNCs and other whizzbangery. The lads were grizzling about their speed, so I was asked to convert them to Linux.... well, Mint was the obvious choice (obviously!) They are a hodge-podge of 4/8GB with spinning rust disks. Some fairly old gear. Mint, despite their scepticism it would work now makes them fly. Happy chaps now. They'll be happier when I plug the USB3 NVMes (older 128's bought real cheap) in the back to boot off rather than the rusty spinners. I thought to be cheeky and put EarlyOOM on them as they essentially POS's. Apple makes nice hardware but they suck at an upgrade path, so extra RAM is a challenge. They wanted to keep running CAD and some industrial machine control programs, so I thought the EarlyOOM with ZRAM would be a good choice. It has proven to be so! It has captured a few events that these ham-fisted louts have done that would have locked the machines tight AF. They popped them, asked me to look at why (as I told them to tell me about crashes as part of the "tuning process") and it has allowed me to give them all workarounds, one problem at a time. The Boss wrote to me today (a Sunday) and said how happy everyone was with the new "upgrades". It didn't cost the biz a cent! Happy workers = better stuff out the door. So, I now think that EarlyOOM SHOULD be a default install. My only consideration would be a good method of ensuring end users :
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Can we add https://github.com/rfjakob/earlyoom as part of the default installation? And set it to terminate sigterm processes when only 5% of ram and swap are available? I had to do this because the default oom_killer wouldn't work on user space processes fast enough on Linux mint 22.1 cinnamon. This is also a well known limitation of linux desktop OSes so it would be nice if linux mint didn't suffer from this problem.
Beta Was this translation helpful? Give feedback.
All reactions