Out Of Memory Freeze Guidance
I seem to always struggle with my system running out of memory and freezing up despite having 32GB of RAM. I know that Fedora comes with Systemd-oomd, but it doesn't seem to be killing processes using too much ram. In testing, it would kill processes, but in the real world, I keep experiencing system freezes with high memory usage. Most recently I've had this happen when the Nextcloud client app was using 24Gb of ram, but I have all sorts of different situations where I am using lots of memory. What should I do to avoid these freezes? Increasing Swap only seems like it will delay the issue, and I'm not sure whether to use something like earlyoom or to modify systemd-oomd especially since I don't fully understand how they work.
28 Replies
I would need to understand a lot more about your use case
I have never run out of memory on 16GB, let alone 32GB
What are some things I could do to better help myself?
I also have freezes on another system with 8GB ram and the freezes happened a lot more often on it. My system would freeze with just a web browser and 1 game open.
if all you're doing is playing a game and having a web browser open, I have no idea
your machine is made by aliens
possibly from mars
basiclsly
i tried on my SO’s laptop as well which has an intel cpu (mine are both amd), and the system freezes sometimes with the minecraft mod pack we have. The mod pack performs much better on bazzite than windows, but on bazzite, occasionally it completely freezes the entire system from oom.
Typically minecraft uses a set amount of ram, and can't grow past that
additionally, I play minecraft w/ a ton of mods on my handhelds, both of which have 16GB of RAM, a portition of which is used as VRAM
no OOM
What could be going wrong other than oom?
for random crashing? overheating maybe?
can grab a
ujust logs-last-boot
not even 4GB of ram
I’ve checked lots before and from what i remember i didn’t even see a sign that oom occurred at all, but i’ll check
I highly doubt OOM is what you're dealing with
not playing minecraft and using a web browser on 32GB
crashes from minecraft and web browser only happened on my partners laptop with 8gb ram
I found a github issue about a memory leak in nextcloud desktop client 3.13, but I don't know what to do to make my system kill the process before memory usaage reaches 100% and system freezes.
I'll do some testing on my partners 8gb ram laptop to see if I can get minecraft to freeze the system again.
The modpack needs around 4gb of ram to run, but when running it, the laptop sometimes locks up and I cant even open tty. This doesn't happen when running the modpack on windows. Maybe it needs some more swap, but I still don't like the system freezes.I'll try to take a picture of system monitor to see if it shows 100% memory usage in minecraft
A web browser with a couple of extensions and a bunch of tabs open could easily eat 8GB of ram.
This is a script I'm running on my work laptop (only 16 GB of ram) that lets me know when I'm running low on RAM, so I can kill stuff before it locks up. Running Kubuntu and not Bazzite but it worked fine last I tested it on Bazzite.
I just save the script somewhere on the box, make it executable and add it to autostart. It might work for you too. Change the THRESHOLD variable as needed
I just save the script somewhere on the box, make it executable and add it to autostart. It might work for you too. Change the THRESHOLD variable as needed
that looks smart
ill try it out thank you so much
Won't fix your problem but at least you can close stuff before you run out of memory
heres nextcloud eating all my ram
That is a memory leak of note.
You might be able to restart next cloud when it's ram exceeds a certain amount if you cobble together a script.
Hopefully they fix the memory leak, that's a bit of a disaster
The issue is so severe im not sure I can even keep using nextcloud client till it's fixed
I wrote a program to just malloc a bunch of memory and nextcloud uses my memory just about as fast as that sometimes
well that explains it lol
I still would like for the system would kill the program rather than freeze
Here is something you might like to play with https://github.com/rfjakob/earlyoom I haven't tried it yet but it should meet your needs... granted it will probably just repeatedly nuke the nextcloud client.
GitHub
GitHub - rfjakob/earlyoom: earlyoom - Early OOM Daemon for Linux
earlyoom - Early OOM Daemon for Linux. Contribute to rfjakob/earlyoom development by creating an account on GitHub.
repeately nuking nextcloud client is better to me than a full system freeze
Tested earlyoom in Kubuntu, it's working very well so far, will try it in Bazzite a little later but it looks like it's a winner.
Fedora used to have earlyoom but switched to systemd-oomd in fedora 34
https://fedoraproject.org/wiki/Changes/EnableSystemdOomd
earlyoom killed nextcloud-desktop successfully for me on bazzite
Earlyoom has been working out well for me.
I was working on an app and for some reason launching from integrated vscode terminal causes a pretty bad memory leak, but earlyoom was able to stop it before it caused a system freeze
My testing of earlyoom has been great too, it's probably going to become one of my default tools that I install on any fresh system.