FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

192 megs of ram?!

53 posts
Thanks Meter: 2
 
By mystica555, Member on 13th February 2009, 12:46 AM
Post Reply Email Thread
13th February 2009, 05:05 AM |#11  
LucidREM's Avatar
Senior Member
Flag Baltimore
Thanks Meter: 5
 
More
Quote:
Originally Posted by widto08

What exactly will this do and will a reboot cancel this?

even if a reboot didn't cancel it .. the next update.zip would .. unless something was built into it
 
 
13th February 2009, 05:23 AM |#12  
t1n0m3n's Avatar
Senior Member
Flag Chicago
Thanks Meter: 64
 
More
yeah a reboot will cancel... how can I make this permanent? What file can I put the swapon command into? I just tried init.rc, but that didn't work.
13th February 2009, 06:10 AM |#13  
OP Member
Thanks Meter: 2
 
More
PROOF OF CONCEPT ONLY! Serious risks involved, still working on this!
As a test, it works. however:

This has a few(lot of?) problems!

Biggest: your sd card cant be mounted as a disk unless you stop swapping. or reboot.

Next: your sd card will die sooner rather than later, as you are doing what it never was intended to do (writing moving data back and forth when its really good just for storing files that may change. sometime.)

Finally, things can start to run slow...VERY slow...
Biggest issue, after my busride with last.fm never stopping, browsing, all the stuff that kept making me angry before. Then i got home and tried to make a phonecall... The dialer worked *reasonably* responsive.. All of about 10s to bring it up. However, MAKING the call took...an eternity.

Hit the green button to dial...phone starts ringing, friend answers, we start talking.. I look at the phone.. black screen...ITS WAITING FOR THE ANDROID PIC AND CALL TIMER THING TO COME UP...40s after i started the call, got a message saying that one process was not responding, force or wait. at this point, when *that* dialog came out of swap, lo and behold the process actually not responding was working fine behind said dialog...

So yeah. its got its benefits, but very large downfalls.

As you *WILL* destroy your flash after an unspecified amount of time, *do not* try to put this on your internal flash. Not in /cache for example. Flash cards are cheap; replacing the g1 because you nuked 64 megs of flash ram is not...

I will test a few methods of separating the flash card from the vfat filesystem (mountable via usb_mass_storage) and report back. Probably partitioning the card, one as swap and such.

ON the other hand, I may also try partitioning 128m as fat16, to make certain the small card's wear levelling scheme is able to do whatever it can to help mitigate the destruction-by-swapping.

Fat32 may not have the same wear levelling mechanisms at the card level on anything less than an SDHC, and guaranteed ext2 wont. Raw swap won't either... As far as I remember, flash wear levelling on sdcards is based entirely on how FAT allocates blocks. (someone knowledgeable about the SD/SDHC and wear levelling feel free to chime in!)

I'll post more later when I try a few more things!
13th February 2009, 06:16 AM |#14  
AbsoluteDesignz's Avatar
Senior Member
Flag New Jersey
Thanks Meter: 49
 
More
I really hope this turns into a sound solution...and then I can die happy.

Or live with my G1 happily...yea thats better.
13th February 2009, 06:29 AM |#15  
t1n0m3n's Avatar
Senior Member
Flag Chicago
Thanks Meter: 64
 
More
Quote:
Originally Posted by mystica555

As a test, it works. however:

This has a few(lot of?) problems!

Biggest: your sd card cant be mounted as a disk unless you stop swapping. or reboot.

Which is why I put it in /system/sd/swap/swap.fil

Quote:
Originally Posted by mystica555


Next: your sd card will die sooner rather than later, as you are doing what it never was intended to do (writing moving data back and forth when its really good just for storing files that may change. sometime.)

Not an issue for me. By the time it wears out, I will have upgraded to a newer faster card anyway.

Quote:
Originally Posted by mystica555


Finally, things can start to run slow...VERY slow...
Biggest issue, after my busride with last.fm never stopping, browsing, all the stuff that kept making me angry before. Then i got home and tried to make a phonecall... The dialer worked *reasonably* responsive.. All of about 10s to bring it up. However, MAKING the call took...an eternity.

Hit the green button to dial...phone starts ringing, friend answers, we start talking.. I look at the phone.. black screen...ITS WAITING FOR THE ANDROID PIC AND CALL TIMER THING TO COME UP...40s after i started the call, got a message saying that one process was not responding, force or wait. at this point, when *that* dialog came out of swap, lo and behold the process actually not responding was working fine behind said dialog...

So yeah. its got its benefits, but very large downfalls.

Could this be due to the speed of your SD card? I am already noticing a marked performance increase.
13th February 2009, 06:39 AM |#16  
t1n0m3n's Avatar
Senior Member
Flag Chicago
Thanks Meter: 64
 
More
I tell you what, if you can give me an idea of where to make this permanent, I am willing to run this card to destruction. I have another 8G class 6 card ready to go, and can swap out easily at any time. All I have to do is make regular backups on my laptop and I should be good to go. (And even then data loss is not really an issue for me anyway.)
13th February 2009, 06:44 AM |#17  
OP Member
Thanks Meter: 2
 
More
Thumbs up Wear levelling..Different than I thought.
Quote:
Originally Posted by mystica555

ON the other hand, I may also try partitioning 128m as fat16, to make certain the small card's wear levelling scheme is able to do whatever it can to help mitigate the destruction-by-swapping.

Fat32 may not have the same wear levelling mechanisms at the card level on anything less than an SDHC, and guaranteed ext2 wont. Raw swap won't either... As far as I remember, flash wear levelling on sdcards is based entirely on how FAT allocates blocks. (someone knowledgeable about the SD/SDHC and wear levelling feel free to chime in!)

Ok, I read a bit into this myself and it seems even back in 2003 wear leveling is done at a very low level: CHS/LBA blocks, versus FAT Blocks.
Sandisk Whitepaper from 2003
I would expect that this sort of wear-leveling is in effect on any of their current cards, including the microsdhc the G1 came with.

As such, it seems swap/ext2 won't have much if any difference compared to FAT filesystems. Its recommended to mount the ext2 with option "noatime" however, so that metadata won't be written for -every single read-.
13th February 2009, 06:50 AM |#18  
OP Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by t1n0m3n

Which is why I put it in /system/sd/swap/swap.fil

It seems I haven't read enough about where you can put files.. Is this /system/sd normal for a G1, or is this after you went and moved apps/caches to the SD card?

Quote:
Originally Posted by t1n0m3n

Not an issue for me. By the time it wears out, I will have upgraded to a newer faster card anyway.

Indeed! This is mainly a warning to not try and use the phone's internal flash.

Quote:
Originally Posted by t1n0m3n

Could this be due to the speed of your SD card? I am already noticing a marked performance increase.

I am 90% certain that it is the speed of the card. Note: I am still using the 1gb card that was installed initially, sadly this phone broke me. Payday friday though means a trip to microcenter

That, or you haven't run 64 megs of apps out of main ram into swap. I had a -lot- of junk running in the background, in addition to the laundry list of apps enumerated earlier in the thread. I think it was: connectbot, helloaim, browser with 4 windows, terminal, alarmclock, calendar (twice! wtf) tmo myfaves switcher, last.fm, maps, voice dialer (twice as well?) google talk messaging klaxon and about 2 or 3 others I cant remember. At peak usage, I had 68 megs swap used and all the ram used as well.

There should be a rather quick and dirty way of getting this into an init script. I'll mess with it at lunch tomorrow.

Right now, sleep is calling and this is one call I'm not forwarding to voicemail!
13th February 2009, 07:11 AM |#19  
t1n0m3n's Avatar
Senior Member
Flag Chicago
Thanks Meter: 64
 
More
Quote:
Originally Posted by mystica555

It seems I haven't read enough about where you can put files.. Is this /system/sd normal for a G1, or is this after you went and moved apps/caches to the SD card?

/system/sd is my ext2 partition on my SD card that I moved my apps/caches to.
13th February 2009, 11:40 AM |#20  
Senior Member
Thanks Meter: 518
 
More
Has anybody tried compcache yet? Its compressed swap and it is ideal for this device, if it can be made to run.

http://code.google.com/p/compcache/
14th February 2009, 04:40 PM |#21  
unrafa's Avatar
Senior Member
Flag Galicia
Thanks Meter: 65
 
More
Swap = apps running 999999 % slower because its writing/reading from sdcard instead from memory.

I even deactivated swap, in my laptop (2gb memory) and never had problems with that.

If apps need more memory i wont let them swap to disk, CRASH BUT NEVER SLOW DOWN!!!!

For those who dont understand, running from memory means driving ferrary and swap means WALK.

Cache always to memory if possible. not disk
Swap always off.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes