WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: RAM usage increase; possibility to free it during a session?  (Read 2189 times)

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
RAM usage increase; possibility to free it during a session?
« on: January 01, 2011, 02:32:46 PM »
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.
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline thane

  • Hero Member
  • *****
  • Posts: 697
Re: RAM usage increase; possibility to free it during a session?
« Reply #1 on: January 01, 2011, 04:32:08 PM »
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.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: RAM usage increase; possibility to free it during a session?
« Reply #2 on: January 01, 2011, 06:22:59 PM »
That's mem used incl. buffers and cache.
You could free mem by
Code: [Select]
sudo cache-clear
Using the htop extension might give you a better impression of mem usage.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: RAM usage increase; possibility to free it during a session?
« Reply #3 on: January 02, 2011, 01:18:05 PM »
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).
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: RAM usage increase; possibility to free it during a session?
« Reply #4 on: January 02, 2011, 01:25:06 PM »
Unused RAM is wasted RAM,
Linux will use all available RAM for cache, reassiging it to programs as needed.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: RAM usage increase; possibility to free it during a session?
« Reply #5 on: January 02, 2011, 01:40:04 PM »
Be aware that tmpfs also seems to account under cache.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: RAM usage increase; possibility to free it during a session?
« Reply #6 on: January 02, 2011, 05:24:30 PM »
... 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
Code: [Select]
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.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: RAM usage increase; possibility to free it during a session?
« Reply #7 on: January 03, 2011, 12:34:18 AM »
If you forget the boot code, you can always start cron with the Services GUI available from the system menu system tools section.
10+ Years Contributing to Linux Open Source Projects.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: RAM usage increase; possibility to free it during a session?
« Reply #8 on: January 03, 2011, 04:29:03 AM »
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.
The only barriers that can stop you are the ones you create yourself.