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

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
3,988
Reaction score
3,661
Credits
32,046
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.
 


shibaa987

New Member
Joined
Oct 5, 2021
Messages
2
Reaction score
0
Credits
14
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?
 
OP
K

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
3,988
Reaction score
3,661
Credits
32,046
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.
 

Fanboi

Well-Known Member
Joined
Apr 16, 2021
Messages
358
Reaction score
270
Credits
4,288
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
 

Shivaraju

New Member
Joined
Oct 5, 2021
Messages
1
Reaction score
1
Credits
6
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
 
OP
K

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
3,988
Reaction score
3,661
Credits
32,046
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.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!


Top