Enabling SD swap on Galaxo


Last Updated:

  1. sado1

    sado1 Well-Known Member This Topic's Starter

    Joined:
    Nov 6, 2009
    Messages:
    103
    Likes Received:
    14
    How to enable swap on external sdcard? I've got Galaxo rom and 64MB SD card, I want to use entire card for swap partition.
     

    Advertisement
  2. kam187

    kam187 Well-Known Member

    Joined:
    Aug 3, 2009
    Messages:
    1,320
    Likes Received:
    46
    There's an option in the custom recovery to create the swap partition. It creates 32mb by default, which should be plenty. If you want to create a bigger one you'll need to use parted. There's guides online somewhere.
     
  3. sado1

    sado1 Well-Known Member This Topic's Starter

    Joined:
    Nov 6, 2009
    Messages:
    103
    Likes Received:
    14
    Yeah, the first thing I tried was that recovery option but it didn't seem to work [I used free to check if swap was enabled]. I've created partition manually in parted and added it to /etc/fstab [/dev/block/mmcblk1p1 none swap sw 0 0; commented /dev/block/mmcblk1 line out] but swap isn't starting automatically.
     
  4. kam187

    kam187 Well-Known Member

    Joined:
    Aug 3, 2009
    Messages:
    1,320
    Likes Received:
    46
    Did you turn compcache on?
     
  5. sado1

    sado1 Well-Known Member This Topic's Starter

    Joined:
    Nov 6, 2009
    Messages:
    103
    Likes Received:
    14
    No, it's off in GalaxoConf.
     
  6. kam187

    kam187 Well-Known Member

    Joined:
    Aug 3, 2009
    Messages:
    1,320
    Likes Received:
    46
    Compcache uses SD swap as backup. That's how its configured as standard. If you want to use sd swap without compcache then you'll need to change the configuration. That doesnt really make that much sense tho. You're better off setting compcache to a small value like 4mb and let that act as a buffer to the sd card swap.
     
  7. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    Hi, can anyone tell me please:

    Is there an easy way in telling if formatting my sd card with swap+FAT32 in the recovery menu has actually worked?

    Should I see two partitions on the sd card when using disk management in Xp? Because at the moment I only see one partition.

    If someone could enlighten me that would be great.
     
  8. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    from terminal;
    su
    parted /dev/block/mmcblk1
    help
    print


    U can create,resize, delete partitions from there.
     
  9. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    Btw I use 100MB sd card swap without compcache. Phone feels much better.
     
  10. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    Works a treat thanks. Do you know the commands to resize the partition from terminal? Also how did you get a swap partition to work without compcache? cheers
     
  11. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    when in parted;
    help
    print
    resize NUMBER START END

    When resized,
    swapon /dev/block/mmcblk1py, where y is number of the partition.
     
  12. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
     
  13. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    Megabytes.
     
  14. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    So if I too wanted a partition of 100mb then would the command line look like this:

    resize 2 0 100

    and then used:

    swapon /dev/block/mmcblk1p2

    What happens if you also turn on compcache?
     
  15. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    Post output of print in parted
     
  16. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    1 32.3kb 8135mb 8135mb 2 8135mb 8166mb 31.5mb
     
  17. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    resize 1 32.3kb 8050mb
    resize 2 8050mb 8166mb
     
  18. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    Ok, thanks. What would happen if compcache was also enabled? Would it still see the new swap partition?
     
  19. Rastaman-FB

    Rastaman-FB Well-Known Member

    Joined:
    Sep 11, 2009
    Messages:
    6,113
    Likes Received:
    1,010
    yes but if you do that, remove swapper or you migh get conflicts
    compcace i find slows things down a little
     
  20. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    Compcache doesn't help when your phone has at least 100MB of RAM less than needed. So just use

    swapon /dev/block/mmcblk1p2
    after resizing and tell me what you think. First thing to try is to open more tabs, you can return to them without reloading from the internet.

    Important thing is the speed of the sdcard. Make sure it's at least Class4, Class6 is better.

    [root@galaxy:/]hdparm -t /dev/block/mmcblk1p2 (external SD - swap partition)

    /dev/block/mmcblk1p2:
    Timing buffered disk reads: 17 MB in 3.14 seconds = 5530 kB/s

    [root@galaxy:/]hdparm -t /dev/block/mmcblk0 (internal SD)

    /dev/block/mmcblk0:
    Timing buffered disk reads: 21 MB in 3.06 seconds = 7017 kB/s


    Try it with yours...
     
  21. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    How do I remove swapper I don't want to use it anymore?
     
  22. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    I get these results:

    /dev/block/mmcblk1p2:
    Timing buffered disk reads: 19 MB in 3.14 seconds = 6175 kB/s
    hdparm: HDIO_DRIVE_CMD: Inappropiate ioctl for device

    /dev/block/mmcblk0:
    Timing buffered disk reads: 14 MB in 3.00 seconds = 4765 kB/s
    hdparm: HDIO_DRIVE_CMD: Inappropiate ioctl for device

    so I can presume from these results that my swap partition is working?

    Why do you think my internal SD card is so much slower?
    Do you think it could do with reformatting?
     
  23. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    This is how you check if swap is working.

    From the terminal type (btw connectbot is very nice term/ssh):

    free

    it will return swap size.

    try turning swap off and on:
    swapoff /dev/block/mmcblk1p2 (wait few moments)
    free (check if swap line is 0 now)
    swapon /dev/block/mmcblk1p2
    free (check if swap is enabled)
     
  24. buntoid

    buntoid Well-Known Member

    Joined:
    Nov 1, 2009
    Messages:
    48
    Likes Received:
    2
    I have turned the swap on with a 116mb swap partition and found the Galaxy became so laggy after opening a few tabs in the browser. it began to lock up for a minute or two. Is it possible a-swapper is not used in GalaxHero? Reading the blurb about GalaxHero on Hdblog.it, drakaz mentions removing a-swapper in favour of compcache. If this is true how do I put a-swapper back on?
     
  25. Andronix

    Andronix Well-Known Member

    Joined:
    Aug 31, 2009
    Messages:
    676
    Likes Received:
    16
    I haven't noticed that lag on my setup. I guess you have compcache turned on. Turn it off and leave just sdcard swap.
     

Share This Page

Loading...