Trying to enable oom_killer

Trying to enable oom_killer:

$ sudo -s sysctl -w vm.oom-kill=1
sysctl: cannot stat /proc/sys/vm/oom-kill: No such file or directory

Check this out:

And this:,_swap_and_OOM_handling

1 Like

Why would this even be needed? I’m not sure i understand why a system would be out of memory in the user space? How does this happen? I mean i have 32 GB memory and powerful CPU and fast hardware. It doesn’t make any sense to me why it happens. Older slower hardware?


The current one I’m on only has 4 Gigs… minus shared graphics memory.

Firefox is always getting close… it’s why I’m just trying out Falkon as a leaner webbrowser, and it is behaving nicer to CPU & Memory resources, even on YT.


Ooh Ouch! Yes that might suck the life out of it! :rofl:

I’d be careful with systemd-oom. Ubuntu tried making it default in 22.04 and users reported all sorts of weird crashes and hangs. Do a web search to find further details.

I believe it’s more for servers, infrastructure and what not, not really meant for desktops, laptops, and tablets.

1 Like

I am wondering if/how much the ram usage is reduced in surf, it’s minimalistic:

You just need a memory leak in some long running process. Here is a minimal example you can try for yourself, if you want to see how OOM looks like:

 * leak.cpp                                                                  *
 *                                                                           *
 * This program creates a nasty memory leak that is likely to crash any Linux*
 * computer. Comes with NO WARRANTY. Use at your own risk.                   *
 *                                                                           *
 * To compile, run:                                                          *
 * g++ leak.cpp -o leak                                                      *
int main() {
  while (true) {
    long double* p = new long double[1000];

If you’re going to execute this, it would be a good idea to have the Magic SysRq Key enabled, because you’re going to need to reboot somehow.

Will this help me with MY memory leaks?

Perhaps, if you put in on a papersheet under your pillow, whilst having it read by an avater on your iphone over night… it mighty might.


I just keep repeating … “You will not forget!”

Nah, that mantra is simply negative. The outcome of that will be “You will . forget!” Affirmations etc. only work w. a positive wording, so you need to rephrase it:
“You will keep it in mind!”

The more complex “it” becomes, the more lines of iterations through “it”'s sentient parts will be needed!


In other words i might not forget. :laughing:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.