• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Sdcard cache speed tweak

ron580

Well-Known Member
Nov 26, 2011
159
64
If any of you guys are using link2sd, app2sd, a2sd etc. this will increase your sd card cache size default is 128kb to 1024kb which would therefore increase your read speeds resulting in faster load times of your applications.

Here are my results without the init.d script. Benchmark called sd tools its in the market.
without.png


Here is with the init.d script. read speeds jumped to 17.3mb/s
with.png


Tutorial
1.)Download script and place it to your sd card. link below.
DOWNLOAD DOWN. WORKING ON A UPDATE
2.)Download root explorer
3.)Open up root explorer and navigate to /sdcard press and hold the script and select move
4.)Navigate to /etc/init.d
5.)mount to R/W
6.)Paste script
7.)press and hold script and select permissions and check read,write,and execute for owner,group and others
7.)Mount R/O
8.)Close root explorer and reboot
9.)To test if its working open root explorer and navigate
to /sys/devices/virtual/bdi/179:0/ tap on read-ahead-kb and view it on text viewer it should say 1024 or the cache size you selected

The Cache size in this script is 1024kb which is perfect for the 2gb sd card that came with the prevail although if your using a different card with a higher memory capacity you might get better results by increasing the cache size. just replace 1024 in the script to one of these intervals 1024, 2048, 3072, 4096 and test out which works best for you.

Easier Way
There are programs in the market that will do this for you but they take up ram and run on every startup
 
  • Like
Reactions: johnny424
Can you elaborate on #5 and the 2nd #7 please.

/etc/init.d is mounted as r/o meaning its "read only" so in order to paste the script you will have to mount /etc/init.d to r/w meaning "read and write". step 5.) to mount /etc/init.d to r/w navigate to /etc/init.d in root explorer and tap on the box located on the top that says mount r/w. step 7.) after pasting the script and giving its permissions tap on the same box located on the top to mount it back to r/o
 
Upvote 0
how do i change cache size incase i would like too?

open the script using wordpad on your desktop and you should see something like this.


#!/system/bin/sh
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "1024" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;


Replace 1024 to one of the values i listed in the tutorial
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones