Why is Linux Using So Much RAM?

0
40
Asked By GamerJoe42 On

Hey everyone! I'm a former Windows gamer and I've recently transitioned to Linux. I play some RAM-hungry games like Kerbal Space Program, Rimworld, Dwarf Fortress, and Arma 3, which can easily use upwards of 20GB of RAM, especially with mods. On Windows, I never had issues with my 32GB of RAM, but now on Linux, I'm always running into memory problems. Just having KSP and Firefox open causes the Out of Memory (OOM) killer to kick in at times.

Currently, I'm sitting at around 28GB of usage with KSP consuming 15.6GB alone, while the rest of my processes don't add up to more than 3-4GB. My RAM usage seems off! I've run the `free -m` command and it confirms the high usage, but I have a 4GB swap set up, which I can't expand without reformatting my SSD.

I've read about Linux's aggressive caching, but surely if that was the issue, the OOM killer wouldn't be so abrupt with killing processes? Is there any way to change the caching behavior in Linux or expand the swap without needing to wipe my drive? I really don't want to switch back to Windows, but this issue is frustrating.

5 Answers

Answered By RAMGuru92 On

Enabling zram can enhance your RAM management. It compresses blocks of memory and could help if you're reaching your limits frequently.

Answered By DistroDude88 On

What about trying Cachy or Garuda for better memory management? Sometimes a lightweight distro can make a big difference.

TechieTim25 -

Switching distros feels like a lot when you're facing a RAM issue in one already. Let's try to solve the current problem first!

Answered By MemoryHawk01 On

You might want to keep an eye on what's eating your RAM. A rogue app could be leaking memory. Also, consider setting your browser to put inactive tabs to sleep – that can free up a ton of memory! Another thing, reclaim your swap partition and create a bigger swap file if you can. Have you tried installing `nohang`? It might help with the OOM issues.

Answered By TechSavvy123 On

Windows already handles swapping automatically, so it's worth checking your swap setup. You can create a swap file instead of reformatting your SSD if you're running low on memory. It can really help in your case!

LinuxChampion99 -

It's a good idea! Adding a swap file can give you more flexibility without the hassle of repartitioning.

Answered By HelpfulHarriet On

Check out the resources on Linux performance that could come in handy! Also, don’t forget to take regular backups and try experimenting in a VM before making major changes. And remember to learn each command fully before hitting Enter!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.