Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: jiffypop23 on September 28, 2011, 05:40:37 AM

Title: RAM and Swap question
Post by: jiffypop23 on September 28, 2011, 05:40:37 AM
Hello.
My RAM usage is usually around 12-15MB and swap at nothing but after opening rtorrent it goes up to ~40MB and fills my 30MB swap.
After exiting out of rtorrent however, it stays at the same 40MB and 30MB.
It isn't a big deal or anything, but what would cause this? How to fix?

Thanks.
Title: Re: RAM and Swap question
Post by: Rich on September 28, 2011, 08:36:38 AM
Hi jiffypop23
Unless it's causing a problem there is nothing to fix. The memory manager is demand driven. When
a program requires RAM the memory manager supplies it. When the program terminates, the RAM
may not be freed up until it is actually needed for something else. The swap space is included in
this process.
Title: Re: RAM and Swap question
Post by: jiffypop23 on September 28, 2011, 05:35:13 PM
Alright, thanks!
There isn't a way to clear it though?
Title: Re: RAM and Swap question
Post by: gerald_clark on September 28, 2011, 05:48:19 PM
Yes, but why would you want to?
If you get a cache hit in the future, it will save disk reads and time.
If the memory is needed, old cache entries will be discarded to supply it.
Title: Re: RAM and Swap question
Post by: vinnie on September 28, 2011, 08:35:17 PM
to celebrate post n.1234 of gerald_clark i say, hundred of these years! hopefully not used to repeat the same things to newbye like me  ;D
Title: Re: RAM and Swap question
Post by: Rich on September 29, 2011, 12:35:51 AM
Hi jiffypop23
Here is a brief writeup I did on this subject:
http://forum.tinycorelinux.net/index.php/topic,9769.msg53362.html#msg53362 (http://forum.tinycorelinux.net/index.php/topic,9769.msg53362.html#msg53362)
Read it, maybe you will change your mind about clearing the RAM. The command to clear the cache
is included in that post if you really want to do that.