Many of us using the SD cards with our Android devices are not satisfied with the reading speeds. This is particularly true when you compare the speeds achieved with in the Android OS on your phone compared to the blisteringly fast speed achieved when the same SD card is connected to your Windows machine. So, what I am trying to say is that, although the inherent speed offered by the SD card is important but in most cases if you are using these SD cards with the Android based devices – actually your mobile OS is becoming the bottleneck!
This happens because when reading from SD card these contents are cached by the Android OS and the problem is that the default size for this cache is set to 128KB in most ROMs and even to 4KB in some ROMs! So, you got the idea for the sluggish reading performance.
You can check cache size by looking into this file:
First thing you need to do is to find a suitable size for your particular cache size for your SD card. Although for most SD cards 2048 KB Cache size works pretty well.
This size can be changed manually but it will reverted to default on the reboot. The changes need to be done permanently by loading the script on the startup through the init.d. There are a number of ways to achieve this. We are providing one of the methods here:
Create a file with the following content:
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
/system/xbin/echo "128" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
Version 2 (If the Version 1 is not working for your ROM):
# Tweak mmc read-ahead – rafpigna –
mmcresult=`echo $folderlist | grep -o ‘\bmmc1:\w*’ | sed ‘s/mmc1://’`
echo 128 > /sys/devices/platform/msm_sdcc.2/mmc_host/mmc1/mmc1:$mmcresult/
Now change the value 128 to what you need (for example 2048 as we suggested above) and save it as "99sdcardreadfix", copy it with the Root explorer. Alternatively, you can push it with ADB into /system/etc/init.d and set permissions to 777. Finally Reboot and you are done!
This hack is provided by a talented XDA developer forum member brainmaster. Here is a performance benchmark provided by the developer in the XDA forums when he increased the cache size from default 128KB to 3072 KB.
Very impressive indeed right? Result speak for themselves. If you want to try the other alternative methods and further discussion such as flashing files in CWM head over to the XDA developer forums.
You Might Like:
Get Free Email Updates
Inspired Geek is your primary source for latest tech news, guides and articles on Windows software, games, Apple and Android devices.
- Get extensive coverage on latest tech news.
- Exclusive guides on rooting, jailbreaking and unlocking mobile devices.
- Useful apps and tips&tricks for your iOS and Android devices.
- Exlclusive Top Countdowns for the best software.