Reply
Thread Tools
Posts: 44 | Thanked: 25 times | Joined on May 2012 @ Karhula, Finland
#1
Hi guys!

I has an IDEA!

ProfileMatic comes with the "Custom action" -thingy which is nearly no use for me with my skills, but could we implement a script there which runs Drop Cache's "Free all"?
I don't know much of any scripting nor coding, but this could be a fantastic improvement. Free memory when ever you want, automatically.

Anyone?



Step-by-step guide:

1. Install Drop Cache & ProfileMatic
2. Fire up the ProfileMatic
3. Create a profile like:

Time:
Starts: 06:00
Ends: 06:01
Every day!!
Custom Action:
Custom action on rule activate:
Code:
aegis-exec /opt/dropcache-mdn/bin/dropcache.sh --3
4. Save
5. Enable rules in ProfileMatics settings.
6. Tsadamn! You've made a script which will clear your cache and free memory at 06:00 every day.


Good luck! It shouldn't be hard.

WARNING: This has not yet been tested enough. Report any problems like battery drain, sluggish phone, applications errors etc. to this thread!!!

I have been using this for 4 months without any noticeable battery drain, sluggishness, phone warming up.. Nothing at all. This trick seems cool to me. Just make it do the "refresh" by night time or when you usually charge your phone, just to make sure you don't get any surprising battery drain during your work-day.

Last edited by weedm8; 2013-03-12 at 07:42.
 

The Following 5 Users Say Thank You to weedm8 For This Useful Post:
Muzimak's Avatar
Posts: 704 | Thanked: 241 times | Joined on Dec 2011 @ Johannesburg - South Africa
#2
Wow man that could be awesome, been wondering how this could work.
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#3
This should work... First of course install DropCache. Then add one of the following to ProfileMatic's Custom action.

Free pagecache:
Code:
sh /opt/dropcache-mdn/bin/dropcache.sh --1
Free dentries and inodes:
Code:
sh /opt/dropcache-mdn/bin/dropcache.sh --2
Free pagescache, dentries and inodes:
Code:
sh /opt/dropcache-mdn/bin/dropcache.sh --3
__________________
My N9/N950 projects:
 

The Following 9 Users Say Thank You to ajalkane For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#4
and what effect might this bring?

if the kernel needs memory it will free whatever memory can be freed (normally the cache). If not, what's the point of freeing the caches? your N9 will have to reload stuff again -> slower + more battery consumption.

please leave the kernel alone!
 

The Following 13 Users Say Thank You to reinob For This Useful Post:
Posts: 44 | Thanked: 25 times | Joined on May 2012 @ Karhula, Finland
#5
Originally Posted by reinob View Post
and what effect might this bring?

if the kernel needs memory it will free whatever memory can be freed (normally the cache). If not, what's the point of freeing the caches? your N9 will have to reload stuff again -> slower + more battery consumption.

please leave the kernel alone!

The benefit I'm looking here would be that the N9 really feels sluggish from time to time. Let's say that 1 minute would suck alot, BUT how about a free memory every 3-24h example.

Same point that the Drop Cache would do, but an automated system that you don't need to bother click click clickety clicking it from time to time to make your N9 run smoother. I'd say it wouldn't be a noticeable battery drain, If used with caution.

Of course, I'm not an expert and this is just my opinion on this. Feel free to explain and give your own opinions. We really need them!!

I'm still wondering does this cause some complications to apps like Wazapp which runs on background and is "idle" nearly 100% of the time? Will they crash / stop while freeing cache? Or does the Drop Cache just affect the cache that is NOT in use by any running application?

Last edited by weedm8; 2012-07-10 at 08:29.
 
Posts: 7 | Thanked: 0 times | Joined on Nov 2011
#6
Originally Posted by ajalkane View Post
This should work... First of course install DropCache. Then add one of the following to ProfileMatic's Custom action.

Free pagecache:
Code:
sh /opt/dropcache-mdn/bin/dropcache.sh --1
Free dentries and inodes:
Code:
sh /opt/dropcache-mdn/bin/dropcache.sh --2
Free pagescache, dentries and inodes:
Code:
sh /opt/dropcache-mdn/bin/dropcache.sh --3
I tested the command in terminal:

sh /opt/dropcache-mdn/bin/dropcache.sh --2
/opt/dropcache-mdn/bin/dropcache.sh: line36: can't create /proc/sys/vm/drop_caches: permission denied
 
Posts: 44 | Thanked: 25 times | Joined on May 2012 @ Karhula, Finland
#7
Originally Posted by all00 View Post
I tested the command in terminal:

sh /opt/dropcache-mdn/bin/dropcache.sh --2
/opt/dropcache-mdn/bin/dropcache.sh: line36: can't create /proc/sys/vm/drop_caches: permission denied
Mmmm... Fix this, then I'm gonna give it a try.

This seems to work in terminal with root access.

This is what I got:

Code:
$ devel-su
Password:


BusyBox v1.20.0.git (MeeGo 3:1.20-0.2+0m8) buil
t-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # sh /opt/dropcache-mdn/bin/dropcache.sh --3
~ #

Last edited by weedm8; 2012-07-10 at 09:00.
 
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#8
...Why don't you just change your VM settings if you do not want any VFS cache?

Also, memory does not work that way.
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 

The Following 4 Users Say Thank You to vi_ For This Useful Post:
Posts: 44 | Thanked: 25 times | Joined on May 2012 @ Karhula, Finland
#9
Originally Posted by vi_ View Post
...Why don't you just change your VM settings if you do not want any VFS cache?

Also, memory does not work that way.
Because I don't know how to, tell me please.
I'm looking for something like fast "re-boot" here mate.

Last edited by weedm8; 2012-07-10 at 09:05.
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#10
Originally Posted by all00 View Post
I tested the command in terminal:

sh /opt/dropcache-mdn/bin/dropcache.sh --2
/opt/dropcache-mdn/bin/dropcache.sh: line36: can't create /proc/sys/vm/drop_caches: permission denied
Hmm... seems like running as root is required. We're getting into the murky waters of aegis land now. You can try:

Code:
aegis-exec /opt/dropcache-mdn/bin/dropcache.sh --3
__________________
My N9/N950 projects:
 

The Following 4 Users Say Thank You to ajalkane For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 08:05.