Remove All Ads from XDA

[COLLECTION] Scripts&Explaination [06/07]

796 posts
Thanks Meter: 1,777
Post Reply Subscribe to Thread Email Thread
This is a collection of echo scripts with optimized values for our janice (i9070&i9070P).
I will add an explanation for every tweak to make things clear.

deepest_state: this allow you to set a sleep level. As far as I know, 3-4-5 states are available; major is the state, better your phone will sleep and so less battery draining (obviously while screen is off).
A tip: I think that 4 state is the best, it doesn't cause troubles on the contrary of the 5 level that may causes problems, but it is stable if using ONDEMAND as governor.

echo "4" > /d/cpuidle/deepest_state;
dirty_expire_centisecs: In hundredths of a second, how old data must be to be written out next time a thread wakes to perform periodic writeback. As I know, permitted values are 100 to 5000, but if I'm wrong, don't esitate to correct me!

echo "5000" > /proc/sys/vm/dirty_expire_centisecs;
dirty_writeback_centisecs: In hundredths of a second, how often threads should wake up to write data back out to disk.

echo "5000" > /proc/sys/vm/dirty_writeback_centisecs;
laptop_mode: is a special page writeback strategy intended to optimize battery life by minimizing memory activity. My tip is to take it off.

echo "0" > /proc/sys/vm/laptop_mode;
max_ac_c: Is a CoCore kernel feature that allow to edit the chargin' values. Safe values are among 100 to 700, put an higher value may damage your battery, instead putting lower value (400 for example) it will preserve battery life.

echo "400" > /sys/kernel/abb-charger/max_ac_c;

mali_l2_max_reads: Set max reads that mali l2 can do.

echo "48" > /sys/module/mali/parameters/mali_l2_max_reads;
mali_debug_level: Disabling it, you can gain some performance improvements.

echo "0" > /sys/module/mali/parameters/mali_debug_level;
fsync: Fsync is an android capability that always writes data out to the memory preventing data loss. If you have a stable system, disable it and you'll have: more battery life, faster system. But be careful you may loose all of your data if your phone shuts down suddenly.

echo "0" > /sys/kernel/fsync/mode; // To enable (default)
echo "1" > /sys/kernel/fsync/mode; // To disable
echo "2" > /sys/kernel/fsync/mode;  // Dynamic (writes data only when screen is off)
vfs_cache_pressure: File system cache is really more important than the block cache above in dirty ratio and dirty background ratio, so we really want the kernel to use up much more of the RAM for file system cache, this will increase the performance of the system without sacrificing performance at the application level. Lower value is better (100 is the max), so for example:

echo "10" > /proc/sys/vm/vfs_cache_pressure;
page-cluster: This controls the number of pages which are written to swap in a single attempt.
It is a logarithmic value - setting it to zero means "1 page", setting it to 1 means "2 pages", setting it to 2 means "4 pages", etc.

echo "3" > /proc/sys/vm/page-cluster;

The default value of sd card cache is 128, but some various tests have estabilished that if you increase this value to 2048, you'll have improvements in write and read sd card operations.

echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:0/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:1/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:2/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:3/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:4/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:5/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:6/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/7:7/read_ahead_kb;
echo "2048" > /sys/devices/virtual/bdi/default/read_ahead_kb;

This should block charging when phone reaches 100% and recharge phone when is 50% (Thanks to @bobfrantic).

echo on > /sys/kernel/abb-fg/fg_cyc
echo dischar=100 > /sys/kernel/abb-fg/fg_cyc
echo rechar=50 > /sys/kernel/abb-fg/fg_cyc
I will add more tweaks, stay tuned guys
Last edited by hastalafiesta; 12th July 2014 at 08:55 PM.
The Following 7 Users Say Thank You to hastalafiesta For This Useful Post: [ View ] Gift hastalafiesta Ad-Free
8th July 2014, 01:56 AM |#2  
coffeecore's Avatar
Senior Member
Flag Amsterdam
Thanks Meter: 379

No DL on OP?

---------- Post added at 02:56 AM ---------- Previous post was at 02:47 AM ----------

Do you have Purging of assets and kernel sampage merging enabled manually in AOSPA with this script? Or only KSM?

8th July 2014, 09:59 PM |#3  
hastalafiesta's Avatar
OP Senior Member
Flag Italy
Thanks Meter: 1,777
Donate to Me
Originally Posted by coffeecore


No DL on OP?

---------- Post added at 02:56 AM ---------- Previous post was at 02:47 AM ----------

Do you have Purging of assets and kernel sampage merging enabled manually in AOSPA with this script? Or only KSM?


I will also add here a script. Nope both (ksm and purging of assets) disabled
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes