cache2cache vs. apps2sd

Search This thread

Peter234

Senior Member
Jul 28, 2010
104
4
Seriously.
What is is the advantage of the cache2cach? One I know: the easy switch between various ROMs and to Froyo. Other than that?

It boils down to this: Is the internal storage of the phone different from the SD card? I *think* both are built on the same technology, so they should not be different as far as reliability is concerned. (limited number of write cycles...)

Any thoughts?
Peter

PS.;: X-posted to Eris' All things Root...
 

roirraW "edor" ehT

Recognized Contributor
May 8, 2010
8,911
4,990
Columbus, OH
Seriously.
What is is the advantage of the cache2cach? One I know: the easy switch between various ROMs and to Froyo. Other than that?

It boils down to this: Is the internal storage of the phone different from the SD card? I *think* both are built on the same technology, so they should not be different as far as reliability is concerned. (limited number of write cycles...)

Any thoughts?
Peter

PS.;: X-posted to Eris' All things Root...

Nice to meet you, Seriously, let me be Frank. :D

The phone's internal memory is faster than the SD card, at least the stock Class 2 8GB SD card. I still had to move the Apps2SD because of the number/size of the Apps I have, but having the Dalvik in the cache partition has been noticeably faster than when I had it on the SD card.

Otherwise, another advantage of the cache2cache is that with moving the Dalvik to the cache partition, as long as you don't have quite as many Apps as I do, then doing this frees up a LOT of internal memory that can now be used for Apps. Again, the internal phone memory is faster than the stock SD card.

It can also be argued what exactly the quality of the stock SD card is, given that they cheaply went the Class 2 route. But at least it's something.

If you research different flash devices (whether thumb drives or Solid-State Disks), look at reviews or such, you'll find that there's many differences in quality of flash technology.

When I buy a 8GB micro-SD card at Micro Center for less than $10, it's lower quality (and slower) than at least some cards that cost over $30.
 
Last edited:

Hungry Man

Senior Member
Jun 11, 2010
2,105
35
Internal memory is faster than external... I see no reason to put all of your apps on the SD, I really don't get putting your cache on it, which should be as fast as possible.
 

doogald

Senior Member
May 27, 2010
1,387
337
Internal memory is faster than external... I see no reason to put all of your apps on the SD, I really don't get putting your cache on it, which should be as fast as possible.

FWIW, I don't use apps2sd or cache2sd myself (I am running KF right now), but I tested my class 6 SD card today, and it is [edit] slightly [/edit] faster than internal NAND at both reads and writes.
 
Last edited:

zach.xtr

Senior Member
Apr 9, 2010
943
82
Tallahassee, FL
Following is a list of points that guided me in creating cache2cache as a feature:

* Cache2cache is just cool :cool: and being cool is fun!
* Internal memory is more stable than the sd card
* For most internal memory is faster as we have not invested in a class 6 or better SD card
* As a DBA in a past life it REALLY bugs me when disk space is not used effectively and I noticed (for whatever reason) HTC did not make use of the /cache/ file block (partition) on our phones. a 125MB + space is A LOT at over 1/5 of our phones total ROM space
* you can run the report_system_settings GScripts on any of my ROMs or the following code from adb to see what file blocks are on your phone
Code:
adb remount
adb shell busybox df -h
* Although I have not taken the time to test, in other computer work I have done it is a good idea to separate the disk of the cache files (which get read A LOT) from your other system files for better I/O.
* Without cache2cache the /data/ file block fills up fast even with standard Apps2sd as the dalvick-cache files can get large

I have not reviewed how Froyo stores files but my guess is it will be very similar to CM 5.x in which case cache2cache will help some but CyanogenMod already writes the dalvik-cache for SYSTEM apps (only) to the /cache/ file block (this is what gave me the idea in the first place!). So redirecting the dalvik-cache of the market or (/data/ apps) to the /cache/ file block will help as you probably still have about 100mb + of unused space...

Can folks that are running Froyo please follow the instructions in this post and post the content of the file and we will see if cache2cache would help Froyo ;)

Have fun!
 

suppliesidejesus

Senior Member
Apr 1, 2010
609
117
I come bearing the burden of knowledge!! Below you will find my pull of the partitions on the ROM. I'm running KaosFroyo v35. As you can see, my /cache/ partition is 30% used, so there is definitely 70% more space there to play with.

Code:
Filesystem                Size      Used Available Use% Mounted on

tmpfs                    95.5M     12.0K     95.4M   0% /dev

tmpfs                    95.5M         0     95.5M   0% /mnt/asec

/dev/block/mtdblock3    170.0M    113.8M     56.2M  67% /system

/dev/block/mtdblock5    159.5M     90.8M     68.7M  57% /data

/dev/block/mtdblock4    130.0M     38.4M     91.6M  30% /cache

/dev/block/vold/179:1

                         14.9G      7.0G      7.9G  47% /mnt/sdcard

/dev/block/vold/179:1

                         14.9G      7.0G      7.9G  47% /mnt/secure/asec

/dev/block/dm-0           3.1M      1.5M      1.6M  48% /mnt/asec/com.google.android.stardroid-1
 

zach.xtr

Senior Member
Apr 9, 2010
943
82
Tallahassee, FL
I come bearing the burden of knowledge!! Below you will find my pull of the partitions on the ROM. I'm running KaosFroyo v35. As you can see, my /cache/ partition is 30% used, so there is definitely 70% more space there to play with.

Code:
Filesystem                Size      Used Available Use% Mounted on

tmpfs                    95.5M     12.0K     95.4M   0% /dev

tmpfs                    95.5M         0     95.5M   0% /mnt/asec

/dev/block/mtdblock3    170.0M    113.8M     56.2M  67% /system

/dev/block/mtdblock5    159.5M     90.8M     68.7M  57% /data

/dev/block/mtdblock4    130.0M     38.4M     91.6M  30% /cache

/dev/block/vold/179:1

                         14.9G      7.0G      7.9G  47% /mnt/sdcard

/dev/block/vold/179:1

                         14.9G      7.0G      7.9G  47% /mnt/secure/asec

/dev/block/dm-0           3.1M      1.5M      1.6M  48% /mnt/asec/com.google.android.stardroid-1

okay nice!

So how do these numbers change as you load more market apps on your phone? I would anticipate that the /cache/ value stay largely constant around 38.4M?

Also can you produce an output file of the "ls" command for the /cache/dalvik-cache/ directory and post as an attachment?
 

suppliesidejesus

Senior Member
Apr 1, 2010
609
117
okay nice!

So how do these numbers change as you load more market apps on your phone? I would anticipate that the /cache/ value stay largely constant around 38.4M?

Also can you produce an output file of the "ls" command for the /cache/dalvik-cache/ directory and post as an attachment?

I have your output. As far as I can tell, the only information in there is for my system apps. The used space has changed slightly, but I think that is from the GMail app update I did shortly after posting that output.

Code:
* daemon not running. starting it now *
* daemon started successfully *
[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@YouT[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

[email protected]@[email protected]

I'll include my output from today, it's up slightly to 38.8 MB and did not change after installing some apps from the market and running them.

Code:
Filesystem                Size      Used Available Use% Mounted on

tmpfs                    95.5M     12.0K     95.4M   0% /dev

tmpfs                    95.5M         0     95.5M   0% /mnt/asec

/dev/block/mtdblock3    170.0M    114.6M     55.4M  67% /system

/dev/block/mtdblock5    159.5M     97.4M     62.1M  61% /data

/dev/block/mtdblock4    130.0M     38.8M     91.2M  30% /cache

/dev/block/vold/179:1

                         14.9G      7.0G      7.9G  47% /mnt/sdcard

/dev/block/vold/179:1

                         14.9G      7.0G      7.9G  47% /mnt/secure/asec

/dev/block/dm-0           3.1M      1.5M      1.6M  48% /mnt/asec/com.google.android.stardroid-1
 

tenzomonk

Senior Member
May 5, 2010
837
35
www.yourmamashouse.com
It needs to be built in at this point. Only xtrRom and xtrSense have it right now, since zach is the one that wrote the code.

So can I install cache2cache or does it need to be built into the ROM?

actually, if you use a2sd v2.7.5.1 (.2) you can use cache2cache.

adb remount
adb shell
a2sd cachepart

phone will reboot... pull battery, boot into recovery, wipe dalvik. restart... and you're good to go :)

-----------------------------------------------------------

adb remount
adb shell
a2sd cachepartreset

Same as cachepart above, but erases the contents of the dalvik-cache after move. This performs both the a2sd cachepart and a2sd resetcache all in one command.
File removed: /data/.dalvikcache

http://forum.xda-developers.com/showpost.php?p=7021609&postcount=5
 
Last edited: