free ram script

tobler

Vu+ User
hello, sleepless night due the hot temp..

i wrote a little simple script for remove unused cached data from the ram (no side issue, only MUCH MORE ram free)

screenshot after the backup script and free-ram executed (on a duo):
screenshotomb.jpg


this version does not try to clean the used swap (i need a test from a user that use the bh swap mode before, since i'm using fstab)
i suggest to add this simple command to the new bh rel ;)

for test it:
green, blue, & execute Free-ram
or it is possible to schedule it with crond

ciao
 

Attachments

  • freeram_bh.tgz
    278 bytes · Views: 90

dalraist

Vu+ User+++
That's the same script posted by Terrorman except for sync command added.
Besides this, that's my question: what's the advantage of using this script?
Linux kernel is doing a great job managing cache, but if you clean it, you throw away such a effort.
If I take notes on what I'm doing and you trash them, I need to spend time to re-think and re-write. Isn't it?
Same happens here. Linux will re-fill the memory with the cache, which is not bad thing. It is good.
So, please, give us a benchmark on the improvement performance with respect to not using this script.
 

tobler

Vu+ User
hello dalraist, you right: is not a priority
i readed about the other plugin, so i looked how to do it with a simple script, only for learn a bit more
and after i decided to put it here, in case of some other users prefer a "readable" more "modular" (eg in the backup script..) sh script (the other plugin for sure is better and more complete)
eg: the backup script available is in a script format, so is it possible to add others functionality
is not a critic: i prefer that one and stop :)

for the cached data, yes you right, but eg here:
after a boot i have 5megs free
after "the clean" there are free 41megs and using the box for some hours decrease just for 1-3megs (so the deleted cached data are not used)

the only way i found for re-waste the ram is the backup plugin script that use pretty all the ram available
so why not, i used it and the free ram looks fine ;)

excuse me for the worst english you ever readed :p

ps: could be nice to have a script and command line tips section for the vu+ for all the "out of gui" q&a
 

dalraist

Vu+ User+++
Don't worry about english... that's my problem too :)
Even I can understand your script digression, which I mostly agree about, I still do not think freeing cache is so usefull.
My point is easy. Is the STB really faster after cache cleaning or is it just matter of seeing a bigger number on "Free memory" slot?
That's actually a real question. In this period I cannot try by my own for many reasons.
 

tobler

Vu+ User
if there are improvement i didn't noticed they :)
but have just 5megs free maybe can slowdown a bit if some further (and differents) data are needed i think
we talking about 35% of the available ram for (apparently , for sure is the wrong word, but i think that you understand :) )) useless datas..
 

dalraist

Vu+ User+++
As I thought :)
Linux cache management is very complex, but it is very efficient. So, any kind of external modification on his behavior I do not think is worth.
Only my 2 cents :rolleyes:

Cheers,
Raist
 

tobler

Vu+ User
a compromise: after the cache datas deletion return back to the kernel defaults config

(executing it clean the ram then re-enable the kernel default config modified by it)
 

Attachments

  • freeram_bh.tgz
    330 bytes · Views: 65
Top