• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.
Sign in to follow this  
Followers 0

Running android in ram?

55 posts in this topic

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

I've sent a message to Kallt_Kaffe about running Android in RAM, let's hope he works something out :P

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

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.com/?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
0

Share this post


Link to post
Share on other sites

Posted · Report post

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

0

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

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

Share this post


Link to post
Share on other sites

Posted · Report post

As far as can understand you have it running FROM ram (a /system ramdisk) rather than from nand.

Yes

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?

I'm sure some things will go quicker, but it'll cost ~120Mb RAM (with JJ) so is it worth it? Dunno? Installed apps, dalvik-cache, app-data are still on NAND.

However as I believe someone mentioned you could take this another step and put the entire system on the sd-card and load it into RAM at boot time and free up most of the NAND for data.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Seems a bit OTT when there is cache in RAM anyway, some of the files loaded will not be used very frequently so loading everything into RAM would be wasteful. What might be better (if it's not already done) is firstly a large cache and secondly the ability to force certain files (like the framework) to be pre-loaded and always remain in cache (which they probably do anyway).

As pointed out earlier in the thread the WM guys are normally loading from SDcard which is already slower than NAND so the benefit they see is not likely to follow on the Blade which loads from NAND anyway.

0

Share this post


Link to post
Share on other sites

Posted · Report post

Seems a bit OTT when there is cache in RAM anyway, some of the files loaded will not be used very frequently so loading everything into RAM would be wasteful. What might be better (if it's not already done) is firstly a large cache and secondly the ability to force certain files (like the framework) to be pre-loaded and always remain in cache (which they probably do anyway).

As pointed out earlier in the thread the WM guys are normally loading from SDcard which is already slower than NAND so the benefit they see is not likely to follow on the Blade which loads from NAND anyway.

Yes, we propably loose more than we gain from this hack, unless we take it further and load the entire system from SD-card. We propably could also put /cache in RAM and get over 450Mb for /data. However I'm not willing to go that far, but a simple hack like not mounting /cache in init.rc would make it end up in RAM which would be much simpler than linking it into /data. Unless of course /cache contains stuff that need to survive a reboot?

0

Share this post


Link to post
Share on other sites

Posted · Report post

Yes, we propably loose more than we gain from this hack, unless we take it further and load the entire system from SD-card. We propably could also put /cache in RAM and get over 450Mb for /data. However I'm not willing to go that far, but a simple hack like not mounting /cache in init.rc would make it end up in RAM which would be much simpler than linking it into /data. Unless of course /cache contains stuff that need to survive a reboot?
Thank you for your work kallt_kaffe! I will try out the rom on wednesday. Do I lose clockwork recovery if I flash the modified boot.img?

Does anyone know how fast the NAND-memory on the phone is? I'm not convinced that it is faster than say a class10 SD-card.

0

Share this post


Link to post
Share on other sites

Posted (edited) · Report post

Thank you for your work kallt_kaffe! I will try out the rom on wednesday. Do I lose clockwork recovery if I flash the modified boot.img?

Does anyone know how fast the NAND-memory on the phone is? I'm not convinced that it is faster than say a class10 SD-card.

its probably not.

The system will cache what it needs into RAM when used. As thee system does _not_ use any virtual memory you will only really see benefits in application start up.

edit: best benchmark I found after a quick search for internal disk speed is RL Benchmark SQLite Performance. Blade spanks the Legend, Tattoo and Galaxy S.

Edited by zerosignull
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.