Today's article is about clearing up RAM and more...

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,497
Reaction score
9,993
Credits
95,326
It's mostly aimed at people coming from Windows, the folks that love their RAM cleaning and the likes... Really, Linux does a fine job of handling memory and unused RAM is wasted RAM (within reason).


Feedback is awesome.
 


It has already mentioned in that article that managing the RAM is a responsibility of kernel, then why do we need to clean the cache or swap space by ourself?
 
Need? You don't need to - normally. The kernel will handle it. On the other hand, if you're low on resources and want to free up resources manually you can do so.

For the most part, just let the kernel do it. The commands exist for a reason, but you normally won't need to worry about it.

Let's say you have 4 GB of RAM and you're using 2.5 with another 1.5 claimed as cached. You want to open GIMP to work on a large project. You can manually drop the cache(s) before hand, rather than starting the application and waiting for it.

Or, if you've just closed a resource intensive application and won't be opening it again any time soon, you can clean the cache(s) manually instead of opening an application in the future and waiting for the kernel to deal with it on its own.

So, does it have a use? Sure... But, for the most part, I'd just let the kernel deal with all that. At the same time, I have gobs of resources at my disposal.
 
Nice! I actually learned something new. Honestly always just let the kernel do its thing, I never bothered delving into fine-tuned memory management, but it's useful to know in case of a kernel bug. I'm inspired to read up further on the topic when I got a moment to spare.

PS:
The article said:
Before you run one of these commands, run free -m before and after running the command.
Reads cleaner as:
Run free -m before and after running these commands.
^Just my 2 cents
 
i dont think its good to clear Ram because is a responsibility of kernel, then why do we need to clean the cache or swap space by user
 
I'm inspired to read up further on the topic when I got a moment to spare.

Make sure anything you read is more recent than the 2.2 kernel, as there were some pretty big changes.

i dont think its good to clear Ram because is a responsibility of kernel

It's perfectly fine if you do or don't. The commands are harmless and exist for a reason. If you have enough resources, just let the kernel do its thing - that's my opinion. Otherwise, you can clean the cache, buffer, swap manually.
 

Members online


Top