Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: floppy on January 01, 2011, 11:32:46 AM
-
hello, I discovered that a TCL session start with approx 110 MB usage with top, application links, application wpa_supplicant, udhcpc running (the 110 MB are indicated with top at the left top side "mem"). While I am tipping these lines, the "mem" indicated is 310 MB. What happens here? I s the memory filling up? Is there a possibility to free it? .. or perhaps the pc hardware is defect? It seems to go sometime down, but with a global tendency for growing.
Thanks for any information because I had the impression the pc is quite going slow.
-
I'm shooting in the dark, but any chance it's your browser? Based on posts I've seen here that's often the culprit in excess memory usage (and slow backup). You might want to look through the forums for discussions of this. There are some lightweight browsers and browsers that have been modified to be less heavy in the repository.
-
That's mem used incl. buffers and cache.
You could free mem by
sudo cache-clear
Using the htop extension might give you a better impression of mem usage.
-
Done. After using firefox, it freed immediatly by approx. 60000kb. Is it not possible to do it by a batch programm every 1/2 h or to have a mechanism for having it done automatically? I am running now with 159012k used, 615548k free, 0k shared, 180k buff, 121088k cached (from 280...k cached).
-
Unused RAM is wasted RAM,
Linux will use all available RAM for cache, reassiging it to programs as needed.
-
Be aware that tmpfs also seems to account under cache.
-
... Is it not possible to do it by a batch programm every 1/2 h or to have a mechanism for having it done automatically? ...
Sure if you'd use boot code 'cron' (or if you've forgotten the boot code you could try sudo /etc/init.d/crond start). You'll then have to set up the cron-job for the 'root' user by calling sudo crontab -e and entering 15,45 * * * * /usr/sbin/cache-clear
(and as you are in a 'vi' session you'll need to first press 'i' to insert, then enter the line, 'ESC' after you've finished and 'ZZ' or ':wq' to save it all).
This should execute the command at 15 and 45 minutes past the hour, for every hour, and every day and every month (and every day of the week). To find out more about the 'crontab' format I'd suggest to read a man-page (http://linux.die.net/man/5/crontab).
-
If you forget the boot code, you can always start cron with the Services GUI available from the system menu system tools section.
-
I agree with gerald_clark, you don't want to empty caches just to feel better with bigger free ram numbers. You'll lose performance that way, and gain nothing really. If any app needs that ram, it is freed automatically from the caches.