As y’all know Manjaro Linux uses a lot of Ram. I am have currently given 8GB of Storage for linux swap also. But It is using so much RAM Memory & storing un-necessary cache. Because of this, My laptop is working slow & lagging a bit. Is there any way to clean un-necessary cache from RAM & not the memory that is being heavily used at the moment ?
There’s no such thing as “cleaning” RAM. Don’t fall for the snake oil Android or Windows applications that claim to “boost” or “clean”. Your available RAM will be used. That’s what it’s there for. See https://www.linuxatemyram.com/
You must be the only one that “knows” that …
From your screenshot it looks like you are running 151 tasks. No matter how you calculate, that will fill the 3.7GiB ram your laptop has and of course the swap will be used too.
Want to clean the cache? This is the command:
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
But i don’t think will be beneficial in your case.
That’s funny how memory usage is a worry for everybody. I just replied to a similar question there : High memory usage with nothing running - #9 by manifesto.
ps_mem.py can help you if you are not confortable with htop.
Checkout the few commands and explanations, it can help. But your case is different as you already use a lot of swap (RAM shortage past or present).
Actually looking at the htop command you have heavy fat application. If you close chrome and /usr/share/team… you’ll probably gain some memory. You do not have so much mem and not much to claim in buffer/cache/shared…
There was a time where computers had 256MB of RAM(or less) running Linux.
Then there was worry about RAM/SWAP/CACHE/… . Then there was reason. But today this reason has gone for a long time.
If you continue to worry about RAM (and there are reasons in special cases), upgrade your RAM. No other thing will help.