Hello everyone,
I am Harsh and I have been using garuda for quite a while now. I have been facing an issue where the RAM gets almost full. I have 8GB RAM and still due the issue my applications lag even when I have only Discord, Firefox and VS Code open. I have read the "Linux ate my ram" article and am aware that Linux caches files takes up ram. And as per my understanding linux should free up cached ram if other applications need it. But in my case it doesn't and I can't tolerate the severe lagging of applications which doesn't happen in windows. What are the possible solutions to this.
Can I put a cap on the amount of ram linux can use for cache purpose lets say I allow only 3GB for cache.
Here is my system information.
*le Ignore lol - totally WAS reading it wrong. You're out of disk space which probably means your swap is useless and it's RAM or crash ;p (unless I'm reading that wrong you might want to deal with your disk first ;))
Basically all the firefox cache that is normally written to disk has no where to write so the websites just bloat it up while it's forced into RAM until you reach critical mass.
That is USED memory, it's not including cached memory in that calculation.
You say you "only" have ... & Firefox & ... but Firefox, like any browser can use 100s of GBs of memory depending on the number and complexity of the tabs you have open, let alone whatever you're running in VS code.
It's like me saying "I've read every book in the Library" without defining whether I'm talking about a library with one childs colouring book or the Library of Alexandria the day before it burned down.
Indeed, I WAS reading it wrong. I just ran an inxi -Faz here and it's the way it dumps it at first glance looks like he's completely out of writable space.
Good luck, Chuck. I've been running it off-and-on for a bit more than a year and still can't quite wrap my head around it. It seems too fluid, as if it can be anything you want it to be but you'd better get it right if you want the filesystem to be performant (or even boot). Too many frickin' ampersands!
I'm not used to that. I like filesystems that stay in one, logical place. Maybe it's because I'm approaching 70 and have burnt out wasted too many braincells along the way, I dunno.
Correct me if I'm wrong, but I think the newest Arch ISO (or the next one's) "Archinstall* routine, sets up BTRFS subvolumes similar to Garuda's--snappable, etc. I know they've been working on it in the Arch .git repositories, anyway, and there was talk of releasing it in December. ("Archinstall" is Arch's guided installation routine similar to their old, discontinued official AIF.)
Yeah you'd have to really dig into the abstraction to see what's up. I mean the volumes/partitions are basically still just folders with a leading @ in the name so le wha? Yesterday when I was trying to fix my bootloader I found a few very odd things about btrfs as a side effect. However I don't see why info dump reports each one @ 100%. Hey 100% of your drive is used 100% x 7 so you now have a magical 700% drive?! Anyhow this is a tad off topic other than when I was looking his sys info over I had that WHA EVERY DRIVE IS 100%? I'd never noticed the sysdump shows like that...however a lot of times since I have to horizontally scroll to see that I'd probably missed it by never scrolling in that section but rather lower down for the GPU/Audio bits.
LOL, my pc doesn't hang even with 11 tabs of firedragon, telegram, clion, terminal and document viewer running simultaneously on a weak 7 year old machine with just 4GB RAM, running Garuda Linux Cinnamon edition.
Back to topic. It is not possible that you have consumed all your RAM and SWAP, with just 3 programmes.
Thank You Everyone for spending time in reading and replying to my query. Sorry for so late response from my side. Actually I got so upset that I didn't boot into garuda till today. So after reading all the answers I conclude that:
I should reboot more frequently (I have a terrible habit of just leaving my pc on lock screen)
I am running out of disk space (Maybe I need to create a swap partition, while installing I chose the option where garuda creates partition on its own). Please suggest me some link/tutorial for doing this.
Here is the output of "df" command. I don't see any partition which is running short of memory.
Outside some swapiness tutorials I've got nothing I can really share. I typically have the opposite issue where I have gobs of free RAM that's ignored while the swap file is like a prime time New York subway car (crammed full to the nuts).
Given my work laptop has half the RAM your machine does (it's OLD and lacks the problem I mentioned about Gobs-O-RAM heh) and I don't have those issues (but I don't run KDE for this reason) I'd play around with a few things.
Disable the ZRAM-generator in the Garuda-Assistant so things have to write to disk rather than RAM.
Open your browsers task manager and see if a specific webpage or extension is being a pig (or has a memory leak). Normally the browser task manager can be opened by right clicking in the tab bar where there are no tabs. This can be tricky if you have a small screen so you might need to open it with only one of your normal tabs open then open the rest after. Then go about your business and when things get bad you have it open to see if anything has gone nuts.
Try a different browser. Discord can be a pig and perhaps Firefox is just caching too much crap. (Just don't add Chome to the list of browsers to try and see next point)
Disable Firefox cache. Just don't let it save anything outside immediate working memory.
Disable all the fancy crap in KDE (you're on an IGP/APU so system memory is video memory i.e. all those fancy shadows/wobbles, transparency, fade in's and slide outs may be adding to the problem)