Announcement

Collapse
No announcement yet.

Ubuntu Developers Have An Idea For Handling The Over-Eager Systemd OOMD App Killing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by sarmad View Post
    Why do engineers always assume that the end user is very stupid and can't make any rational decision? Just show a dialog to the user and let him choose what to kill.
    Because you cannot always assume there is a user in front of the screen watching?
    Because the user could provoke an oom situation to kill some deamon which prevents access to a certain file or maybe a virus scanner deamon.

    Comment


    • #22
      I'm not completely familiar with how the killer works but it might be a good idea to add another kill switch: SIGOOM which memory hungry apps like the browser should honor by killing of tabs or things like that prior to killing complete processes.

      Comment


      • #23
        I was getting random applications disappearing before I upgraded to Ubuntu 22.04. It got worse with the upgrade.

        I added the max amount of memory my laptop will support 32Gb. I still get random applications disappearing even though I doubled the swap space as well.

        I installed Arch Linux on a development box and followed the guide for swap space. I wish I had not and just followed the old metric from 20yrs ago. I have the same problem I have with Ubuntu random applications disappearing. However I can't increase the amount of RAM on this machine, I have however added a large swapfile which has helped.

        I would have liked some warning as it took ages to figure out what was happening.

        The biggest memory use is the browser.

        Comment


        • #24
          Originally posted by ehofman View Post
          I'm not completely familiar with how the killer works but it might be a good idea to add another kill switch: SIGOOM which memory hungry apps like the browser should honor by killing of tabs or things like that prior to killing complete processes.
          Or the browser can at least prompt the user to close tabs

          Comment


          • #25
            If the browser is the process which uses the most RAM on your machine - you probably need an ad blocker (or even a request blocker if you want more).

            With 5 open browser windows, each around 20 opened and loaded tabs it's just the fourth largest memory consumer (the largest being IntelliJ BY FAR, heck, even MS Teams needs as much memory as the browser).

            Comment


            • #26
              What's the issue with saying no to the one requesting more memory when it's not available anymore and let the user chose the one that should be killed ? And maybe keep a small amount of free ram to run some privileged soft to kill the process ?

              Comment


              • #27
                Originally posted by oleid View Post

                Because you cannot always assume there is a user in front of the screen watching?
                Because the user could provoke an oom situation to kill some deamon which prevents access to a certain file or maybe a virus scanner deamon.
                Then only show a dialog with user space processes, or processes that are safe to kill.
                If no user is in front of the screen, then simply show the dialog and wait until the user is in front of the screen, in the mean time the processes needing the extra memory can just hang and wait. If it's a server, then again just hang the processes that are wanting the extra memory until an admin ssh into the server and select what to kill; it's not like the server will be of any use after you kill some random process. If you have a server and you know you have memory leaking processes that are safe to restart then you can configure oom killer for your server and tell it exactly what to kill and restart.

                In short, let the user decide what to kill, either decide on the spot or decide upfront before it happens. Don't act like you know better than the user.

                Comment


                • #28
                  Originally posted by Raka555 View Post

                  Or the browser can at least prompt the user to close tabs
                  That was the idea behind the suggestion.

                  Comment


                  • #29
                    Originally posted by reba View Post
                    If the browser is the process which uses the most RAM on your machine - you probably need an ad blocker (or even a request blocker if you want more).
                    The browser was just one example of memory hungry applications. I think every developer knows it's software requires much memory and every developer knows best what to do in case of low memory situations.

                    Comment


                    • #30
                      Originally posted by rclark View Post
                      Seems to me a solution to a non-problem. I mean memory is cheap and plentiful. If you experience out-of-memory problems, your machine isn't configured properly for the use case. Don't get it .
                      In my experience, OOM killing comes into play when something on your machine goes haywire, like file indexing (Tracker, Baloo,..) blowing up a process to > XX GB. And once you've got a file on your disk, that makes tracker-index blow up, you don't have the time to configure it, before it grinds your machine to dust. For example I've got a little script in my desktop startup that kills all tracker processes. It's a race, what is faster, Gnome-tracker in crashing or the script in killing tracker processes, but the oom-killer will always tip the scales in favor of my script

                      It would be nice, if Gnome tracker could be configured to not index certain filetypes or directories, but the functionality is utterly broken for me (Ubuntu 20.04). So, OOM killing is still very relevant and always will be, because you can't "properly configure away" all existing bugs. Failure is not an exception, it is one of the regular states of any sufficiently complex system and has to be accounted for.

                      Comment

                      Working...
                      X