Results 1 to 13 of 13

Thread: Swap

  1. #1
    offline So I Hear You Can Mod
    Join Date
    Nov 2010
    Location
    UAE
    Posts
    398
    Thanks
    34
    Thanked 114 Times in 66 Posts
    Downloads
    3
    Uploads
    0

    Swap

    As we are all well aware, our XT doesn't have endless amounts of RAM. After a fresh boot I have around 120MB of RAM available, which quickly fills up when launching multiple large apps. When filled, things become sloooooooooooow and annoying. Now I could just ditch it and get a new device with more RAM, but then again I didn't spend hours making the fast "flawless" ROM to be outplayed by the RAM.
    The solution: Swap!

    What you need:
    - A fast SDHC card (the faster the better obviously)
    - A kernel with swap support
    - The app "swapper"

    Great thing is, you can create the swap file on a FAT or ext partition. Set the size, format it and you're done.
    I use 256MB of swap on a class10 card - and now even the biggest apps just fly

  2. 5 Users Say Thank You to GroovyG For This Useful Post

    blackwing182 (08-11-2011), Hairo (08-11-2011), josuearisty (08-13-2011), Saurus (08-11-2011), turl (08-11-2011)

  3. #2
    offline Moderator
    Join Date
    Dec 2010
    Posts
    605
    Thanks
    118
    Thanked 763 Times in 236 Posts
    Downloads
    2
    Uploads
    0
    Also, remember SD Cards don't have infinite life and every write counts; using swap on it might reduce it's lifetime. But then, you probably won't be using your XT anymore when it fails because of this

  4. The Following User Says Thank You to turl For This Useful Post:

    Hairo (08-11-2011)

  5. #3
    offline So I Hear You Can Mod
    Join Date
    Nov 2010
    Location
    UAE
    Posts
    398
    Thanks
    34
    Thanked 114 Times in 66 Posts
    Downloads
    3
    Uploads
    0
    True, but with the expected cycles to failure being in the millions with current flash cards already, both the cards and the phone will have become anciently obsolete well before even coming close to failing

  6. The Following User Says Thank You to GroovyG For This Useful Post:

    josuearisty (08-13-2011)

  7. #4
    Hairo's Avatar
    offline Blue Mage
    Join Date
    Jul 2008
    Location
    root@hairo-desktop:/home/hairo# _
    Posts
    1,597
    Thanks
    1,581
    Thanked 943 Times in 514 Posts
    Downloads
    524
    Uploads
    66
    [MENTION=3226614]GroovyG[/MENTION], mm, i saw it before (i had swap on my Motorola Zine) but i heard somewhere that it might slow some android phones so i never used swap...

    PD: A class 4 SDHC will work fine??
    Last edited by Hairo; 08-11-2011 at 04:27 PM.

  8. #5
    Saurus's Avatar
    offline Moderator
    Join Date
    Sep 2010
    Location
    daLLas
    Posts
    1,351
    Thanks
    228
    Thanked 298 Times in 249 Posts
    Downloads
    74
    Uploads
    2
    Put it together with this and see what you get - [SCRIPT] The Best RAM Optimization

    Blinding Electronic Speed

    Your method looks good, [MENTION=3226614]GroovyG[/MENTION]. I'll try it first.
    Hic sunt dracones...

  9. #6
    offline Moderator
    Join Date
    Dec 2010
    Posts
    605
    Thanks
    118
    Thanked 763 Times in 236 Posts
    Downloads
    2
    Uploads
    0
    Quote Originally Posted by Hairo View Post
    PD: A class 4 SDHC will work fine??
    Probably swapping on that card will slow down things. But you never know, try and see

  10. #7
    Hairo's Avatar
    offline Blue Mage
    Join Date
    Jul 2008
    Location
    root@hairo-desktop:/home/hairo# _
    Posts
    1,597
    Thanks
    1,581
    Thanked 943 Times in 514 Posts
    Downloads
    524
    Uploads
    66
    Quote Originally Posted by turl View Post
    Probably swapping on that card will slow down things. But you never know, try and see
    Tryed at 256mb, and some things are more fluid... like opening the app drawer animation, oppening an app animation, etc... even tested a game (cut the rope) and it seems to be more fluid...

  11. #8
    offline So I Hear You Can Mod
    Join Date
    Nov 2010
    Location
    UAE
    Posts
    398
    Thanks
    34
    Thanked 114 Times in 66 Posts
    Downloads
    3
    Uploads
    0
    [MENTION=3209357]Saurus[/MENTION],
    Not all of them would help with swap, and even be counterproductive as they aim to keep RAM free by closing apps.
    With swap you want the exact opposite, keep everything in RAM/swap so there's no need to actually close anything - thereby gaining the extra speed. All of the useful VM tweaks are already in the ROM.

    [MENTION=1122281]Hairo[/MENTION],
    It will of course work with a class4 as well, just the gains in performance won't be that substancial.

  12. The Following User Says Thank You to GroovyG For This Useful Post:

    Saurus (08-16-2011)

  13. #9
    DJGHOSTS3V3N's Avatar
    offline The Helper
    Join Date
    Oct 2010
    Location
    In the Carribean
    Posts
    1,691
    Thanks
    111
    Thanked 371 Times in 223 Posts
    Downloads
    4
    Uploads
    0
    What do you think on a thirty two Gigs? Haha Just saying...

    Sent from my MB501 using Tapatalk

    "Remember that life loves you, but most of the time, you don't love life"


  14. #10
    offline Moderator
    Join Date
    Dec 2010
    Posts
    605
    Thanks
    118
    Thanked 763 Times in 236 Posts
    Downloads
    2
    Uploads
    0
    Quote Originally Posted by DJGHOSTS3V3N View Post
    What do you think on a thirty two Gigs? Haha Just saying...

    Sent from my MB501 using Tapatalk
    32G doesn't say anything, It might be Class 2

  15. The Following User Says Thank You to turl For This Useful Post:

    rfunderburk (08-13-2011)

  16. #11
    skivvies's Avatar
    offline So I Hear You Can Mod
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    134
    Thanks
    62
    Thanked 30 Times in 13 Posts
    Downloads
    1
    Uploads
    0
    i hav like 80mb of phone memory available, is it possible to use about 50-60 of phone memory instead of SD card ?

  17. #12
    offline Moderator
    Join Date
    Dec 2010
    Posts
    605
    Thanks
    118
    Thanked 763 Times in 236 Posts
    Downloads
    2
    Uploads
    0
    Quote Originally Posted by skivvies View Post
    i hav like 80mb of phone memory available, is it possible to use about 50-60 of phone memory instead of SD card ?
    I really wouldn't, stressing it too much could cause bad blocks on it. But as technically possible, yeah you can. You would need to create a zero filled file with dd on there and then use that as swap.

  18. The Following User Says Thank You to turl For This Useful Post:

    skivvies (08-14-2011)

  19. #13
    offline So I Hear You Can Mod
    Join Date
    Nov 2010
    Location
    UAE
    Posts
    398
    Thanks
    34
    Thanked 114 Times in 66 Posts
    Downloads
    3
    Uploads
    0
    What you can do to free up more phone memory, is moving some apps to the system partition. The app "System App Remover" can do it for you, it's quite useful for large apps that don't get updates very often, like office and such.

  20. The Following User Says Thank You to GroovyG For This Useful Post:

    skivvies (08-14-2011)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •