Jump to content


Photo

Running android in ram?

- - - - -

  • Please log in to reply
54 replies to this topic

#1
HMB

HMB

    Newbie

  • MoDaCo Silver
  • Pip
  • 9 posts
  • Devices:ZTE Blade
Hello! After installing android 2.2 (darkstone ram) on my brothers HTC HD2 and seeing the awesome speed and fluidity, I'm wondering why no one has done that yet? Sure you'll lose some ram but for me that is acceptable.

Kind regards /Henrik

  • 0

#2
gremlinman

gremlinman

    Enthusiast

  • Members
  • PipPipPip
  • 211 posts

Hello! After installing android 2.2 (darkstone ram) on my brothers HTC HD2 and seeing the awesome speed and fluidity, I'm wondering why no one has done that yet? Sure you'll lose some ram but for me that is acceptable.

Kind regards /Henrik

R u getting rom and ram confused? ?

  • 0

#3
jurrasstoil

jurrasstoil

    Diehard

  • Members
  • PipPipPipPip
  • 345 posts

R u getting rom and ram confused? ?


nope, he isn't. there is a way to load the system into the ram while booting:
http://forum.xda-dev...ad.php?t=870518

  • 0

#4
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy
Looking at this, shouldn't it be possible to use a TPT to make the system-partition really small or nonexistent, the rest of the NAND for userdata/apps, and keep the ROM on the SD-Card?
Benefits:
+Lot of space for the user and his apps on the Nand... almost all space on NAND for the user and his apps, around 120MB more than with a normal TPT and a small system.
+This reduces need for A2SD. Nand is faster than the SD, so this is a plus.
+System gets loaded from the SD into the RAM at startup, and will be a lot faster than from NAND

-RAM gets reduced by the systems size, around 120MB, right? But around 300 MB available should still be enough!

-->Overall increased performance.
I guess we need some module that loads everything into the RAM at startup, I don't now if this would take two boots in a row (think like with HARET at WinMo).
But everything else should just work if this module works right, or not?

edit: Und danke für den Link, jurasstoil ;)
And thanks for the link, jurasstoil!

Edited by FelixL, 05 February 2011 - 06:23 PM.

  • 0

#5
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@fonix232
It wouldn't need a module, but a simple kernel addition (a little expansion to load the system into RAM, then just overwrite the place the system gets loaded).

  • 0
If you like my work, invite me for a drink or two!

Also, take a look at my Blade-dedicated site too! fonix232.co.cc

#6
wbaw

wbaw

    account closed

  • Banned
  • PipPipPipPipPipPip
  • 1,885 posts
  • Gender:Not Telling
It could be a good idea for performance, but I'm really not sure. It might hurt performance more than it helps.

It wouldn't give any more usable storage space, because ram isn't permanent storage, it'd be lost on reboot or power off. So we'd still need to keep a copy in nand & load the entire partition into ram at boot, so it's going to add to boot time. It could possibly be stored on the sdcard, but it'd need to be in something else that's going to preserve file permissions, it can't just be on FAT.

Also, if we're loading stuff into ram disks then what about dalvik-cache? Would that give more of a performance boost & use less ram? That'd want to be rewritten to nand at power off though, which could cause problems.

The kernel already uses spare ram as a cache, so the benefits might not be so great. I'd expect the default kernel caching to do a better job.

Edited by wbaw, 05 February 2011 - 07:07 PM.

  • 0

#7
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy

It wouldn't give any more usable storage space, because ram isn't permanent storage, it'd be lost on reboot or power off. So we'd still need to keep a copy in nand & load the entire partition into ram at boot, so it's going to add to boot time. It could possibly be stored on the sdcard, but it'd need to be in something else that's going to preserve file permissions, it can't just be on FAT.


Is there much in /system that gets changed? I thought things like the settings get stored somewhere else, otherwise they would have had problems with this too on the build for the HD2 . If there are no changes while Android is running it would be no problem that the RAM isn't permanent. Only problem would be the need of a(ext2 or 3, I'd guess) partition for /system on the SD.


Also, if we're loading stuff into ram disks then what about dalvik-cache? Would that give more of a performance boost & use less ram? That'd want to be rewritten to nand at power off though, which could cause problems.


And what if the device has a spontaneous reboot...?

Edited by FelixL, 05 February 2011 - 09:03 PM.

  • 0

#8
HMB

HMB

    Newbie

  • MoDaCo Silver
  • Pip
  • 9 posts
  • Devices:ZTE Blade
Data loss isn't a problem for the darkstone rom. On the HTC HD the Darkstone ROM/OS writes changes to a file located on the SD-card, this file should be possible to place on NAND on the Blade to avoid problems with unmouting/mounting memory card.

Here is a video that is pretty good at showing how fast the mobile becomes:


Kind regards /Henrik

Edited by HMB, 06 February 2011 - 07:46 AM.

  • 0

#9
vareBlade

vareBlade

    Enthusiast

  • Members
  • PipPipPip
  • 206 posts
  • Gender:Male
  • Devices:ZTE-Blade
  • Twitter:@varemenos

Data loss isn't a problem for the darkstone rom. On the HTC HD the Darkstone ROM/OS writes changes to a file located on the SD-card, this file should be possible to place on NAND on the Blade to avoid problems with unmouting/mounting memory card.

Here is a video that is pretty good at showing how fast the mobile becomes:


Kind regards /Henrik


It took him 1 min to boot ( not sure if it matters that it was the 1st boot?)

Edited by vareBlade, 06 February 2011 - 08:02 AM.

  • 0


-----------------------------------------------------------------------------------------
Varemenos.com | AKLP.gr
-----------------------------------------------------------------------------------------


#10
HMB

HMB

    Newbie

  • MoDaCo Silver
  • Pip
  • 9 posts
  • Devices:ZTE Blade

It took him 1 min to boot ( not sure if it matters that it was the 1st boot?)

First time takes A LOT longer, check the speed in the menus etc later on in the film :P

/Henrik

  • 0

#11
FelixL

FelixL

    Enthusiast

  • Members
  • PipPipPip
  • 196 posts
  • Location:Germany
  • Devices:San Francisco, Moto Defy

Data loss isn't a problem for the darkstone rom. On the HTC HD the Darkstone ROM/OS writes changes to a file located on the SD-card, this file should be possible to place on NAND on the Blade to avoid problems with unmouting/mounting memory card.


When does it write these changes, while running or while shutting down? If while turning off, I guess you would loose all changes if the ROM crashes.

  • 0

#12
richardtkemp

richardtkemp

    Newbie

  • Members
  • Pip
  • 18 posts
  • Devices:Dream

When does it write these changes, while running or while shutting down? If while turning off, I guess you would loose all changes if the ROM crashes.


The data partition is stored on the sdcard as an img file, writes are made as needed. As far as I can tell data is not loaded to RAM. I would also love to see some development on this, as it seems not too complex (at least not so complex as some things) and the Blade has enough RAM to handle it.

  • 0

#13
HMB

HMB

    Newbie

  • MoDaCo Silver
  • Pip
  • 9 posts
  • Devices:ZTE Blade
I've sent a message to Kallt_Kaffe about running Android in RAM, let's hope he works something out :P

  • 0

#14
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

It wouldn't need a module, but a simple kernel addition (a little expansion to load the system into RAM, then just overwrite the place the system gets loaded).


I've got a version up and running now. Actually what I did was I overridden /init with a script that mounts the system nand partition to /system_nand and then copies everything into /system (which means it ends up in the ramdisk). When it is done it calls the real /init.

I've got two boot.img's for JJ ready (non-AHB and AHB overclocking).

Not sure if it's any faster. What we should take into consideration is that the HD2 guys usually run from a ext2 diskimage on the SD-card and what they changed is this ROM is that they copied the system.ext2 image into the ramdisk before mounting it. Going from SD-card to RAM will make a bigger difference than going from NAND to RAM as we will.

I'll have a link up in a minute with the two boot.img files.

  • 0
Blog - App

#15
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad
Here's two boot.img files for Japanese Jellyfish RLS9. Use them at your own risk.

It will have the "old" system mounted as /system_nand as read/write so you can easily make changes like adblocking, vm heap changes and stuff like that permanent by copying stuff from /system to /system_nand (assuming you know what you are doing).

http://www.mediafire...24g3denn8fc2y2j

It's not very optimized, just a quick hack. Ideally we would use a much smaller busybox with just the minimum of needed commands in /bin.

USE FASTBOOT METHOD TO INSTALL!!

EDIT: Oh, and it will of course take a little longer to boot.

Edited by kallt_kaffe, 07 February 2011 - 12:44 PM.

  • 0
Blog - App

#16
andycanada

andycanada

    Newbie

  • Members
  • Pip
  • 40 posts
  • Location:Canada
  • Devices:ZTE Blade (Swiss OK Mobile)
anyone try it yet? if so, how is the speed?

  • 0

#17
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

anyone try it yet? if so, how is the speed?


I have it running like that right now. Seems to work fine. Benchmarks in Quadrant and Linpack seems to be roughly the same. Feels a bit quicker but it might be placebo.

  • 0
Blog - App

#18
oh!dougal

oh!dougal

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,022 posts
  • Location:England
  • Devices:DX2 FroYo San Francisco
Despite the thread title, surely it always runs IN ram? (Its not 'execute in place' is it?)

As far as can understand you have it running FROM ram (a /system ramdisk) rather than from nand.
And so its only any 'on the fly' loading of system modules that would be speeded up.
Does much of that go on (with our big ram)? And for what areas of the device's operation?

  • 0

#19
andycanada

andycanada

    Newbie

  • Members
  • Pip
  • 40 posts
  • Location:Canada
  • Devices:ZTE Blade (Swiss OK Mobile)

I have it running like that right now. Seems to work fine. Benchmarks in Quadrant and Linpack seems to be roughly the same. Feels a bit quicker but it might be placebo.


So if I decide to try this, I need to first install JJ9, then use fastboot to flash the "boot.img" file to the boot partition?
i.e. "flashboot-mac flash boot boot.img"?

  • 0

#20
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

So if I decide to try this, I need to first install JJ9, then use fastboot to flash the "boot.img" file to the boot partition?
i.e. "flashboot-mac flash boot boot.img"?

Correct!

  • 0
Blog - App




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users