Jump to content

Running android in ram?


Guest HMB

Recommended Posts

tmpfs for /cache does work! it was just a permissions problem.

these three lines will remount /cache as tmpfs


umount /cache
mount -t tmpfs -o size=42M,nr_inodes=42k,mode=0770 tmpfs /cache
chown system.cache /cache
[/codebox]

It appears to speed up app installs from the market, not sure it's worth the loss of ram. downloaded apks do stay there, but the max size is 42m (same as original /cache partition) so it shouldn't cause much trouble.

Edited by wbaw
Link to comment
Share on other sites

I just tried doing the same for dalvik-cache, in init_qcom.sh & now it wont boot :D

Maybe redirecting dalvik-cache in init.rc might work, but i'm not sure how sensible it'd be.

Putting /cache on a ramdrive works well.

Edited by wbaw
Link to comment
Share on other sites

Can anyone see any problems making a TPT zip without a system or cache partitions all together? I've slimmed down and tar.gz'd the system partition image to about 60mb... I'll make the boot partition 60mb bigger add the system image, and mount it in ram like you've been discussing. A few meg in ram for cache & dalvik-cache.

I bet we can get somewhere near to 450mb space in /data for apps! And by keeping system as small as possible, it'll not use much ram or take much time to boot either :D

A few problems ...

/cache is used by the recovery programs (clockwork, etc) to store logs, it gives errors if it can't mount it. it's unlikely you'll ever need those logs & it doesn't affect how it works, it just gives error messages. the minimum size for the cache partition to mount correctly appears to be somewhere between 1mb & 1.5mb (1.5mb works, 1mb doesn't, didn't try intermediate sizes).

Even if you don't care about those errors, the partition still needs to be there, because the only way we can edit the partition size at the moment is hexediting a file. so i think it has to be 128k minimum, same for any other partitions.

There are hidden partitions using some nand space too, about 40mb if I remember right, the stuff in those partitions seems to be vital & we don't know enough to risk changing that. Maybe if somebody wants to risk bricking their phone we could get another 15mb or so from there & it might work, but it runs a serious risk of totally bricking the phone.

So you wont get over 400mb /data without putting your system on the sdcard.

However it seems like an interesting idea for speed, that would seem to be the fastest way to do it to me, increase the boot partition size & pack system in the kernel ramdisk.

Edited by wbaw
Link to comment
Share on other sites

I just tried doing the same for dalvik-cache, in init_qcom.sh & now it wont boot :D

Maybe redirecting dalvik-cache in init.rc might work, but i'm not sure how sensible it'd be.

Putting /cache on a ramdrive works well.

Are you sure it doesn't boot at all? Because by just moving the dalvik-cache location, the boot will be very slow as it has to create all those dalvik files. You could copy the files in dalvik-cache on each boot, that should be faster.

Would be worth a try, with stopping the exact apps startup times (using a stop watch) and comparing that to dalvik-cache on internal rom.

Link to comment
Share on other sites

Are you sure it doesn't boot at all? Because by just moving the dalvik-cache location, the boot will be very slow as it has to create all those dalvik files. You could copy the files in dalvik-cache on each boot, that should be faster.

Would be worth a try, with stopping the exact apps startup times (using a stop watch) and comparing that to dalvik-cache on internal rom.

You can't copy the dalvik cache files on boot if you put it on a ramdisk, unless you save them when you shut down.

I'm sure it didn't work for me, when I tried it, I only tried it once. I left it for 20 minutes, it wasn't going to boot.

I'm not sure what stopped it working, it might even have been something as simple as a permissions problem (although i think i set it right). I'm not saying it's impossible, but I failed & I'm not trying again.

After I'd got my phone booting again (by reflashing the previous config file in clockwork). The phone had forgotten most of my settings, it was back to default wallpaper, no icons on home screens & it'd lost a lot of my other settings.

Added to that I'm sceptical that it'd improve performance at all, it's probably a waste of time & will hurt more than it helps.

Feel free to try it if you want, if it works it probably wont help performance (more likely to hurt it), if it doesn't it'll mess up all the settings on your phone & you'll need to restore a nandroid backup.

I've also noticed that there is a startup script in the full version of flb-froyo 8, but not in the slim version, /system/etc/init.d/02cachedalvikcache It looks like that script copies the dalvik cache to /cache. I haven't tried it in combination with my script that puts /cache on a ramdisk yet. That's probably the easiest way to test it. It might not work & even if it does it might not be a good idea.

Edited by wbaw
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.