• Faresh@lemmy.ml
    link
    fedilink
    English
    arrow-up
    16
    ·
    1 year ago

    Does the OOM killer actually work for anyone? In every linux system I’ve used, if I run out of memory, the system simply freezes.

    • Fedora@lemmy.haigner.me
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      Yes, it takes surprisingly long for the OOM killer to take action, but the system unfreezes. Just wait a few minutes and see whether that does the trick.

    • Devion@feddit.nl
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      Yeah, default Ubuntu LTS webserver kicked the mysqld on a stupid query (but it worked on dev - all developers, someday) not too long ago…

    • Turun@feddit.de
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      Yes. If you have swap the system will crawl to a halt before the process is killed though, SSDs are like a thousand times slower than RAM. Swapoff and allocate a ton of memory to see it in action.

    • TauZero@mander.xyz
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      It never kicks in for me when it should, but I figured out I can force trigger it manually with the magic SysRq key (Alt+SysRq+F, needs to be enabled first), which instantly recovers my system when it starts freezing from memory pressure.

      • drathvedro@lemm.ee
        link
        fedilink
        arrow-up
        4
        ·
        1 year ago

        Alt+SysRq+F, needs to be enabled first

        Do note that this opens up a security hole. Since this can kill any app at random and is not interceptable, if you leave your PC in a public place, someone could come up and press this combo a few times. Chances are, it’ll kill whatever the locking app you’re using.

    • jabjoe@feddit.uk
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Oh yes. I’ve had massive compiles (well linking) which failed because of the OOM killer, and I did exactly the same, massive swap so it will just keep going. So what if it’s using disk as RAM and unusable for a few hours in the middle of the night, at least it finishes!