Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

Swap Enable/Disable


  • Please log in to reply
86 replies to this topic

#41 daleoffret

daleoffret
  • Members
  • 2 posts
  • Twitter:daleoffret
  • Country:us
  • Device Model:MT3G (Magic 32B)
  • MOD Version:CyanogenMod 6.0.0-DS
  • Recovery Image:Amon_RA

Posted 03 September 2010 - 06:24 PM

-Stevo-

Great stuff.  I too have an MT3G and have been looking for a performance boost on CM for a few months.  

Thanks.

(bootswap40 on 2 partition card)

#42 Magellan

Magellan
  • Members
  • 125 posts
  • LocationRamsey, MN
  • Country:us
  • Device Model:G1
  • MOD Version:6.1 Nightly
  • Recovery Image:ClockworkMod

Posted 03 September 2010 - 11:43 PM

Is vmtweaks different than VM heap size option in Performance Settings?

#43 dasunsrule32

dasunsrule32

    I love Android!

  • Donators
  • 146 posts
  • Twitter:christiantechs
  • LocationChandler, AZ
  • Country:us
  • Device Model:Samsung SGH-T959
  • MOD Version:7.0.0-Nightly
  • Recovery Image:ClockworkMod

Posted 05 September 2010 - 12:24 AM

Ummm...If you are using cm6, then it already has swap enabled in the kernel. All you need to do is drop your userinit.sh in /data/local with your swap settings included.

Read here for more info on setting up your userinit.sh: CM Wiki

General rule of thumb, if you have no a2sdext setup, then you you will need to use: /dev/block/mmcblk0p2.

If you do, then: /dev/block/mmcblk0p3.

No reason to use external scripts, etc, make it simple. Good luck. ;)

#44 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 05 September 2010 - 01:17 AM

View Postdasunsrule32, on 05 September 2010 - 12:24 AM, said:

Ummm...If you are using cm6, then it already has swap enabled in the kernel. All you need to do is drop your userinit.sh in /data/local with your swap settings included.

Read here for more info on setting up your userinit.sh: CM Wiki

General rule of thumb, if you have no a2sdext setup, then you you will need to use: /dev/block/mmcblk0p2.

If you do, then: /dev/block/mmcblk0p3.

No reason to use external scripts, etc, make it simple. Good luck. ;)


wow. are you serious? people can do this by creating their own script?

go threadjack somewhere else, this thread isnt about being able or unable to enable swap in the cyanogen kernel, it's about the script that i created to do it for you easily.

Keep it simple?

What's more simple? flash something and run a command, or create your own userinit file, place the file where it needs to go, make sure the syntax is correct, set permissions on the file, and hope that your sdcard is fast enough to be detected on boot to have swap enabled?

People know the cm wiki exists, people also have no idea what they are doing, why do you think it was created in the first place. stick to complaining about the bewbs wallpaper.

k,thanks. bye.

#45 Magellan

Magellan
  • Members
  • 125 posts
  • LocationRamsey, MN
  • Country:us
  • Device Model:G1
  • MOD Version:6.1 Nightly
  • Recovery Image:ClockworkMod

Posted 05 September 2010 - 01:23 AM

Speaking as one who has no idea what he is doing, I greatly appreciate Stevo's script.

#46 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 05 September 2010 - 02:04 AM

View PostMagellan, on 03 September 2010 - 11:43 PM, said:

Is vmtweaks different than VM heap size option in Performance Settings?

yes, it's been suggested that the two values currently in vmtweaks, when dialed down can improve multitasking performance and an overall better swap experience, personally the results seem negligible, but it was requested and some people swear by them. Suggested settings are 50 and 1

#47 parkenshaw

parkenshaw
  • Members
  • 59 posts
  • LocationBrooklyn
  • Country:us
  • Device Model:|2|
  • MOD Version:6.0
  • Recovery Image:Amon_RA

Posted 06 September 2010 - 04:52 PM

hmm, seems to be working like a charm. Great work.

#48 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 08 September 2010 - 12:39 AM

sounds like mediafire is having issues, updated with a new mirror, i'll throw a couple others up as well.

#49 DroidSeer

DroidSeer
  • Members
  • 22 posts
  • Country:us
  • Device Model:T-Mobile G1
  • MOD Version:6.0.1
  • Recovery Image:Amon_RA

Posted 12 September 2010 - 03:18 PM

Thx -Stevo-. The script worked like a charm, my G1 is much zippier than before.

For a G1, with class6 sdcard. I created Fat+ext+swap partition, thinking this would be better. Do you recommend a swapfile w/ Fat+ext or what I already have?

#50 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 13 September 2010 - 04:47 AM

Use what you have, swapfile is mainly more useful if you don't want to format the sdcard , or testing other configurations.

#51 Lint6

Lint6
  • Donators
  • 259 posts
  • LocationMontgomery County
  • Country:us
  • Device Model:HD2/HTC Glacier
  • MOD Version:7
  • Recovery Image:ClockworkMod

Posted 17 September 2010 - 08:23 AM

Ok..this might be a dumb question..but how can I tell if this worked?  I flashed through recovery, ran bootswapv2 through adb and set it to use my swap partition..phone boots up fine, no crashes etc...is there anything I can do just to give myself the "yes, it worked" feeling?

#52 kaalchakra

kaalchakra
  • Members
  • 33 posts
  • Twitter:sunzoje
  • Country:np
  • Device Model:G2x
  • MOD Version:CM7 nightlies
  • Recovery Image:ClockworkMod

Posted 17 September 2010 - 03:13 PM

View PostLint6, on 17 September 2010 - 08:23 AM, said:

Ok..this might be a dumb question..but how can I tell if this worked?  I flashed through recovery, ran bootswapv2 through adb and set it to use my swap partition..phone boots up fine, no crashes etc...is there anything I can do just to give myself the "yes, it worked" feeling?
while booting led flashes. or you can use 'free' command in terminal to check swap.

#53 Jimmy13

Jimmy13

    Karma Police

  • Donators
  • 61 posts
  • LocationHouston, TX
  • Country:us
  • Device Model:Tmobile G2
  • MOD Version:CM7 nightly 263
  • Recovery Image:ClockworkMod

Posted 26 September 2010 - 06:04 PM

B)
Well Stevo I made a Fat+swap partition setup with amon ra recovery then flashed your script and ran the prompts in terminal. My phone runs better than it ever has. Thank you so much for all your hard work on this.

I have swappiness at 10 and vm tweaks at 50 and 1 like you mentioned earlier. I did notice that on a MT3G in amon ra I couldn't make a 12mb partition because the smallest on I could scroll to was 32mb. That being said it's still working like a charm.

Thanks a lot for all your input on the matter and the great script!!! :D

#54 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 26 September 2010 - 11:51 PM

Custom partition sizes can be done if you console or adb into recovery and run sdparted -I

#55 Magellan

Magellan
  • Members
  • 125 posts
  • LocationRamsey, MN
  • Country:us
  • Device Model:G1
  • MOD Version:6.1 Nightly
  • Recovery Image:ClockworkMod

Posted 26 September 2010 - 11:56 PM

Can you change the swap partition size without wiping the whole card this way?

#56 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 28 September 2010 - 01:35 AM

No, sdparted will destructively partition. Backup first. tools exist for shrinking the partition on your pc, and I believe the e2fs programs can do this.

#57 Jimmy13

Jimmy13

    Karma Police

  • Donators
  • 61 posts
  • LocationHouston, TX
  • Country:us
  • Device Model:Tmobile G2
  • MOD Version:CM7 nightly 263
  • Recovery Image:ClockworkMod

Posted 28 September 2010 - 02:32 AM

View Post-Stevo-, on 28 September 2010 - 01:35 AM, said:

No, sdparted will destructively partition. Backup first. tools exist for shrinking the partition on your pc, and I believe the e2fs programs can do this.

I have no problem with backing up and repartitioning. My only Concern is if that will mess up my swap setting as they stand because I know nothing of the nature of the Script other than it's awesome. Would I need to do swap-off>bootswap-off then reflash and after I have a newly partitioned card or can I just repartition and then run the initial scripts again. What would you recommend for switching.

Please excuse my lack of knowledge.  :lol:

EDIT: Thanks for the info in the post below :)

#58 -Stevo-

-Stevo-
  • Members
  • 1,297 posts
  • LocationSalt Lake City, Utah
  • Country:us
  • Device Model:HTC Vision G2
  • MOD Version:CM7.0.0-RCX
  • Recovery Image:ClockworkMod

Posted 28 September 2010 - 05:11 PM

The script will remain until you flash again, you might want to run it again to change swappiness

#59 Dukenukemx

Dukenukemx
  • Members
  • 3 posts
  • Device Model:G1
  • MOD Version:Cyanogen 6.0
  • Recovery Image:Amon_RA

Posted 02 October 2010 - 02:02 AM

Anyway to tell if this script is working?  After I installed the script I typed "bootswap30" after I typed "swapon30".  I'm guessing 30 as in 30 megabytes of swap?  I have a 32MB ext swap on my SD card.

#60 klueless

klueless
  • Members
  • 1 posts
  • Country:ca
  • Device Model:Rogers G1
  • MOD Version:CyanogenMod-6.0
  • Recovery Image:Amon_RA

Posted 02 October 2010 - 07:16 PM

Having difficulty installing the SwapScriptv2.1.1-signed.zip. Something I'm not doing right.  
Here's what it says when I try to flash this package from sdcard.

     Opening update package...
     Verifying update package...
     Installing update...
     Copying files...
     Copying files...
     E:Can't chown/mod /system/bin/swapscriptv2
     (No such file or directory)
     E:Failure at line 3:
     set_perm 0 0 0755 SYSTEM:bin/swa

     Installation aborted.

Help??
Thanks

I have:
Rogers G1 (32B)
ROM: CM 6.0 D/S with bc-6.0.0-ebi1
Recovery: Amon RA-dream-v1.7.O0R
Radio: 3.22.26.17
SPL: "Danger" SPL (1.33.2005)