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
 

Enabling swap


This topic has been archived. This means that you cannot reply to this topic.
202 replies to this topic

#41 SkyHawk

SkyHawk
  • Members
  • 6 posts

Posted 14 July 2010 - 06:24 AM

Does anyone know what happened to backing swap? It disappeared right around the time I moved to CM5, and I've been missing it.

#42 mr.incredible

mr.incredible
  • Members
  • 112 posts

Posted 14 July 2010 - 12:42 PM

View Postnwordjim, on 14 July 2010 - 04:36 AM, said:

Out of curiosity, why does having a larger swap partition effect its performance?

The way I understand it, the way CM5 and maybe CM6 handles swap is different. If swap is available it will use it, all of it. It uses swap like physical memory. Swap just gives you more room to breath. Since VM is slower than physical mem you don't want a lot of it. I'm sure there is more to it than that, but that is my take on it.

#43 mr.incredible

mr.incredible
  • Members
  • 112 posts

Posted 14 July 2010 - 01:18 PM

View Postconnoisseur, on 14 July 2010 - 04:42 AM, said:

This is exactly my problem... any easy way of shrinking the swap partition without reformatting the entire card and having to pull out everything on the fat and ext partitions first???

Not that I know of. I tried with gparted on Ubuntu. I could resize the swap, but for some reason I couldn't resize/move the ext partition to fill the space. If that dead space doesn't bother you then do that. I wanted to completely rebuild the phone anyway so I did a full partition/format. You can download Ubuntu 10.04 Desktop and burn the CD. The CD will run as a standalone, and it has gparted installed.

#44 invisiblewave

invisiblewave
  • Donators
  • 1,085 posts

Posted 15 July 2010 - 02:00 PM

View Post-Stevo-, on 14 July 2010 - 04:42 AM, said:

This the swap script installer for cm6:
http://goaruna.com/cqnw

Gives you these new commands in terminal:

swapon10
swapon20
swapon30
swapon40
swapon50
swapon60
swapon70
swapon80
swapon90

The commands will mount your swap partition with the corresponding swappiness. Bootswap was removed until cm6 and run parts can see the external partitions required.

Thanks again, Stevo!  This time I did a quick test, rather than doing it on the fly whilst in the gym.

Test 1.  No swap, compcache off.
Started Streamfurious, waited for buffering, radio started playing.
Hit Home key, Streamfurious stops.

Test 2.  No swap, compcache on.
Started Streamfurious, waited for buffering, radio started playing.
Hit Home key, Streamfurious keeps playing.
Started browser.  Halfway through page load, Streamfurious stops.

Test 3.  Swap30, compcache off.
Started Streamfurious, waited for buffering, radio started playing.
Hit Home key, Streamfurious keeps playing.
Started browser.  Halfway through page load, Streamfurious keeps playing.

On my 32B, at least, the results are dramatic.  Without swap, my Android is an iFlop (other than not dropping calls), with swap it multitasks perfectly.  I don't see any performance impact from having swap on.

#45 anwoo

anwoo
  • Members
  • 50 posts

Posted 15 July 2010 - 05:03 PM

I have a question: If my sdcard is class 10, is it still slow (as compared to internal mem)?

#46 invisiblewave

invisiblewave
  • Donators
  • 1,085 posts

Posted 15 July 2010 - 05:26 PM

View Postanwoo, on 15 July 2010 - 05:03 PM, said:

I have a question: If my sdcard is class 10, is it still slow (as compared to internal mem)?

There was a thread about this a few weeks ago.  From memory, I think the answer is yes.  The speed information suggested that anything beyond Class 6 is a waste of money because the transfer speed is limited by the phone hardware rather than the card.

#47 elmoojps

elmoojps
  • Members
  • 4 posts

Posted 15 July 2010 - 08:47 PM

I used to run swap on roms in the past. The performance of CM6-RC1 was horrible for me with no swap. Programs were taking a while to load and going back to home would cause a reload of ADW. I was going to try swap, but started to explore the other reasons for the poor performance first and found them! Once I changed the following settings my Mytouch 3G (32B) is very fast:

Settings > ADWLauncher > System Preferences

Wallpaper Hack: Checked
Orientation Sensor: Unchecked (not sure if this one matters though)
Use Screen Cache: Checked
Scrollable widget support: Unchecked!
System Persistent: Checked

Settings > CyanogenMod Settings > Performance Settings

Use Compcache: Checked
Use JIT: Unchecked
Enable Surface Dithering: Checked (not sure if this one matters though)
VM heap size: 16 M

With the above settings my phone is very fast, applications load very quickly, and returning to home is instant! I have been running this way for the past few days and I'm really amazed!

Try them out and let me know if you still need swap...I know I don't need it!

#48 invisiblewave

invisiblewave
  • Donators
  • 1,085 posts

Posted 15 July 2010 - 09:24 PM

View Postelmoojps, on 15 July 2010 - 08:47 PM, said:

I used to run swap on roms in the past. The performance of CM6-RC1 was horrible for me with no swap. Programs were taking a while to load and going back to home would cause a reload of ADW. I was going to try swap, but started to explore the other reasons for the poor performance first and found them! Once I changed the following settings my Mytouch 3G (32B) is very fast:

Settings > ADWLauncher > System Preferences

Wallpaper Hack: Checked
Orientation Sensor: Unchecked (not sure if this one matters though)
Use Screen Cache: Checked
Scrollable widget support: Unchecked!
System Persistent: Checked

Settings > CyanogenMod Settings > Performance Settings

Use Compcache: Checked
Use JIT: Unchecked
Enable Surface Dithering: Checked (not sure if this one matters though)
VM heap size: 16 M

With the above settings my phone is very fast, applications load very quickly, and returning to home is instant! I have been running this way for the past few days and I'm really amazed!

Try them out and let me know if you still need swap...I know I don't need it!

Have you tested its multitasking performance without swap?

#49 -Stevo-

-Stevo-
  • Members
  • 1,297 posts

Posted 15 July 2010 - 11:19 PM

View Postinvisiblewave, on 15 July 2010 - 09:24 PM, said:

Have you tested its multitasking performance without swap?

Yes, and it's pathetic.

#50 invisiblewave

invisiblewave
  • Donators
  • 1,085 posts

Posted 15 July 2010 - 11:34 PM

View Post-Stevo-, on 15 July 2010 - 11:19 PM, said:

Yes, and it's pathetic.

I've still yet to hear a convincing reason why swap isn't a good idea, a lot of people say it's bad, but are somewhat reticent in backing up their statements with facts.  If it comes to the point where I can't run swap at all, then I'll either go back to an earlier release or buy a new phone.  I'm already anxiously monitoring the Desire status.....

#51 sparksco

sparksco
  • Donators
  • 20 posts

Posted 16 July 2010 - 04:35 AM

View PostFirerat, on 12 July 2010 - 03:43 PM, said:

you are already running the script 'late'

add a shabang

#!/system/bin/sh

Dear Firerat lol,

I am running the cm6 rc1 (not nightly).  I flashed with rom manager and worked rather well I might add.  One problem though.  I ran your all in one patch then rebooted.  Checked swap, swap was on.  On next reboot, swap off?  System performance was way better before with swap on, how do I get it to start on boot and stay that way?

#52 nwordjim

nwordjim
  • Members
  • 267 posts

Posted 16 July 2010 - 05:02 AM

View Postsparksco, on 16 July 2010 - 04:35 AM, said:

Dear Firerat lol,

I am running the cm6 rc1 (not nightly).  I flashed with rom manager and worked rather well I might add.  One problem though.  I ran your all in one patch then rebooted.  Checked swap, swap was on.  On next reboot, swap off?  System performance was way better before with swap on, how do I get it to start on boot and stay that way?
I have same issue. People have come to the conclusion that its because the sd card isnt mounted as quick as it used to in older versions

#53 O.Rayo

O.Rayo
  • Members
  • 74 posts

Posted 16 July 2010 - 06:08 AM

View Postnwordjim, on 16 July 2010 - 05:02 AM, said:

I have same issue. People have come to the conclusion that its because the sd card isnt mounted as quick as it used to in older versions

Get Swapper 2 from the market and configure it "run swapper at startup"

#54 pbelcomp

pbelcomp

    Cheeseburger?

  • Donators
  • 662 posts

Posted 16 July 2010 - 06:58 AM

View Postorayo, on 16 July 2010 - 06:08 AM, said:

Get Swapper 2 from the market and configure it "run swapper at startup"

Does "run swapper at startup" work for you?

It has never worked on my phone.

#55 LeChuck

LeChuck
  • Members
  • 23 posts

Posted 16 July 2010 - 10:33 AM

View Postpbelcomp, on 16 July 2010 - 06:58 AM, said:

Does "run swapper at startup" work for you?

It has never worked on my phone.

Doesn't work on mine either... and, most of the times when I enable swap to file (/sdcard/swapfile.swp) it fails... I have to repeat the operation several times to make it work... it's a pain in the ass

#56 Cody Fyler

Cody Fyler
  • Members
  • 17 posts

Posted 16 July 2010 - 03:43 PM

Just installed latest Swapper 2 from Market, and it starts on boot!

#57 pbelcomp

pbelcomp

    Cheeseburger?

  • Donators
  • 662 posts

Posted 16 July 2010 - 04:11 PM

View PostCody Fyler, on 16 July 2010 - 03:43 PM, said:

Just installed latest Swapper 2 from Market, and it starts on boot!

Well, I see one of my problems.  I was using the old Swapper, not Swapper 2.  Oops.

#58 Cody Fyler

Cody Fyler
  • Members
  • 17 posts

Posted 16 July 2010 - 04:16 PM

I tried swapper 2 a few months back and it didn't start on boot then, it does now, though! I'm stoked!

#59 siani_8

siani_8
  • Members
  • 48 posts

Posted 16 July 2010 - 04:21 PM

I would also like to know if backing swap is working on CM6.  I saw a post by Stevo in (Ideas on how to make CM 6 FASTER and RESPONSIVE?)where he says he is using it.  I had it working on previous versions but not now.  Could someone please be kind enough to give directions on how to enable it for CM6.  Thanks.

#60 vassago

vassago
  • Members
  • 20 posts

Posted 16 July 2010 - 04:58 PM

View Postinvisiblewave, on 15 July 2010 - 11:34 PM, said:

I've still yet to hear a convincing reason why swap isn't a good idea, a lot of people say it's bad, but are somewhat reticent in backing up their statements with facts.  If it comes to the point where I can't run swap at all, then I'll either go back to an earlier release or buy a new phone.  I'm already anxiously monitoring the Desire status.....

i don't think anyone's necessarily saying it's bad. it's just a trade off. for me, when i turned on my swap things were painfully slow, but i was able to run pandora and the browser at the same time. smaller swap seems to be the way to go. mines at 64mb right now, thinking about dropping it to 32mb and trying again. i had a similar experience in 5.0.8, but in cm5 i was able to run without swap and still do a lot of multitasking and it was much much faster than running the swap.