[Optimus One, P500, V General] base45c:
tmpfs - android - application ram/speed improvement

I didn't use this exact script. I was trying to enhance something else last week, when I thought of the idea. Through searching today, I located a similar XDA post/script. I am *however* making daily use of tmpfs on a HTC Desire. I'm yet to extensively test this.

I take it android would manage ram as required. I generally found the original allocation for tmpfs inside init.rc.

Here's some ideas. I am NOT responsible for any damage caused:

- Using "terminal emulator", type "df" at prompt and tap [enter]

- Take note of the amount(s) in the "Used / Available" columns.

In particular, note the tmpfs filesystems (or possible /mnt entries).

- Research --> "tmpfs" or "tmpfs benefits" etc

I have only checked the 'df' on a few devices. It initially appears the tmpfs mount point is assigned to RAM, however is barely utilised. (also related "ramdisk speed")

--> Using the "(re)mount - size=" parameter, this may be reduced/resized or put to use for executables (e.g. dalvik-cache)

There is information available that documents which parts are consuming the most power on android devices. In general, this seemed mainly the touch screen, gps, gpu, cpu, net etc. The RAM appeared to be one of the lowest for power consumption.

Phone:

HTC Desire (BRAVO PVT1 SHIP S-ON, HBOOT-0.93.0001, RADIO-5.11.05.27)

Class 6 - Sandisk sdcard

I prefer roms that are smooth, don't force close or slow down - even after a week of usage. It could be difficult otherwise. Also, I look for exceptional standby battery life. Hibernate is excellent, and added features is a definite plus.

Positives:

I would *not* go back to using this phone without dalvik on tmpfs. Using android is significantly more responsive overall.

The dalvik-cache is already stored in RAM - the same RAM that was previously allocated/assigned as available for tmpfs yet appeared unused. I found where it had previously been slow, it now nearly elimates the initial delay on every starting single application, whether you have just used it before, or not since many days ago etc.

Also, there is reduced usage on the on slower sdcard/nand. Therefore where say a launcher may have slowed down at times due to background tasks starting, it now does so noticeably less - even in the launcher. After android has settled down from the boot process, starting the browser for the first time, is practically instant.

However as previously noted, this probably won't particularly apply for larger applications that must load lots of saved data from the sdcard - like games requiring 100mb+ etc.

This idea may only be more applicable for the older slower devices.

Approximate tmpfs allocated on devices:

HTC G1 - 50mb

HTC Desire - 200mb.

Samsung Galaxy Nexus - 300mb.

These all *appear* for the most part unused.

The default RAM allocated for tmpfs (without the (re)mount size= parameter), appears to be related to a portion of the devices total RAM. (see tmpfs documentation).

Negatives: (using my own script)

Each time the phone boots up it refreshes/rebuilds the dalvik-cache. This could be difficult on other roms with force closes. That said, this seems dalvik is kept up to date, and it writes significantly faster to ram than the sdcard/nand. If I flash in recovery, the dalvik-cache could be already clear.

Alright, that should be far more than enough for anyone interested.

I apologise for the extremely long drawn out post. Hopefully I have been thorough, and these ideas might be more useful, than difficult.

Later when I have more time, I shall upload a video.