1

I've had it happen a few times -- e.g. while running a python program that parses a large file in memory, or using Firefox to share a screen while a lot of docker containers were running -- that Gnome would get to the state where I can't do anything and I have to reboot the computer.

This "state where I can't do anything" isn't a crash -- I can move the mouse around, and if there was audio running the audio keeps running -- but I can't open a new terminal, or type anything on an existing terminal.

Is there something I can set that forces Ubuntu to leave enough memory to be able to run Gnome (e.g. open terminals, kill other processes) even if another process is attempting to consume all the memory on the machine? I'd prefer the other process to get an out of memory error (which it can handle itself), even if it hasn't consumed literally all the memory.

This system has 8GB of RAM and 1GB of swap. The swap is a swap partition, not a file.

An answer to the question OOM killer not working suggests a possible cause and partial fix: if vm.oom_kill_allocating_task is not set to 1, scanning the system to try to find a process to kill may take too long to succeed, making the system unusable. Comments to that answer suggest vm.admin_reserve_kbytes should do what I want if it worked, but unfortunately it apparently does not.

What I'm seeing is apparently a bug fixed in 2014 that has resurfaced.

Chris Midgley
  • 335
  • 5
  • 12
  • Hmmm. All supported releases of Ubuntu already include a fully-automatic Out Of Memory (OOM) Killer process that does exactly what you are asking for. Are you talking perhaps about a crash (freeze)? Perhaps you might edit your question a bit to lead us through your troubleshooting process so far. – user535733 Jan 08 '21 at 13:45
  • No, it doesn't crash. I can move the mouse around, and if there was audio running the audio keeps running -- but I can't open a new terminal, or type anything on an existing terminal. – Chris Midgley Jan 08 '21 at 13:47
  • Not in comments, please -- edit your question. – user535733 Jan 08 '21 at 13:48
  • How much memory does your system have installed? How large is the swap file? Like 535733 says, Ubuntu is pretty good about handling this stuff by itself unless it's starved for resources to the point of no return. –  Jan 08 '21 at 14:19
  • Get more RAM. You have 8GB, and run a lot of dockers or other RAM guzzling applications... That's asking for problems. – vidarlo Jan 08 '21 at 15:59

0 Answers0