So from what I understand linix swap is a method to make your phone run faster. My phone has been acting a bit sluggish lately when loading the home screen.
When partitioning my sd card (using ra recovery) it asked how large of a swap to use, I checked another thread and found out that the recommened size for cupcake is 64mb. I set it at that. Is my phone currently using the swap or do I need to activate it/ use an app
In addition to the obove questions could someone outline the advantages/disadvantages.
Thanks a lot for any help.
asb123 said:
So from what I understand linix swap is a method to make your phone run faster. My phone has been acting a bit sluggish lately when loading the home screen.
When partitioning my sd card (using ra recovery) it asked how large of a swap to use, I checked another thread and found out that the recommened size for cupcake is 64mb. I set it at that. Is my phone currently using the swap or do I need to activate it/ use an app
In addition to the obove questions could someone outline the advantages/disadvantages.
Thanks a lot for any help.
Click to expand...
Click to collapse
In cyanogen you will need to edit the user.conf or userinit.sh, I'm not sure which, to activate linux-swap as he uses compcache as default
It depends on who you ask... CompCache (CC), IMO, is better than swap for many reasons, the most of which is that it seems to be faster in scientific testing, and the best test of all, the seat of your pants test.
The problem with CC is that if you want to flash a ROM that is huge, ie a Hero ROM, you run out of room, so it becomes slower compared to a swap where you are actually adding "RAM" by using the SD card to do this. Some have been able to make Hero small enough to work with CC, but not enough for most people wanting all the bells and whistle's of Hero.
CC has some draw backs, the biggest being that it is slower than no CC in a solo task since the CPU has to uncompress the data when you re-open a program (You really see this when you open your browser back up and it takes 5 seconds to "reload" the page). But this is about the only real draw back.
Swap has a few more draw backs... it burns up your SD card, although it isn't a "huge" deal, it is still a draw back. As well, like CC, the CPU has to pull this data off the SD card, it isn't just sitting in memory like true RAM, so it's speed is limited by the speed of the SD card and the speed of the G1 at reading the SD card. In the end, since swap tends not to be compressed anywhere close to what CC is, it ends up being not that big of a deal in terms of actual speed... ie the browser might take half a second longer to open than CC right out of the box, but if you end up with 15 apps running and Rosie(what makes a Hero ROM a Hero ROM) it will take less time since it is at least still in the "RAM" and doesn't have to be re-opened 100%.
I hope this makes sense, and for those wiser than I, if I misrepresented let me know and I shall bow down like red chowder bows down to white chowder.
you can also use the app "user.conf v.030"
that's what i use, because i can control swappiness
i have now compcach enabled 64MB, ccbackinswap (swappiness 50), and 128MB linux-swap (swappiness 50)
works like a charm
shmigao said:
you can also use the app "user.conf v.030"
that's what i use, because i can control swappiness
i have now compcach enabled 64MB, ccbackinswap (swappiness 50), and 128MB linux-swap (swappiness 50)
works like a charm
Click to expand...
Click to collapse
And I take it that this will make my phone run quicker? My phone has been a bit sluggish in loading the home dash
would this make my phone run quicker? and cold you explain swappiness
asb123 said:
would this make my phone run quicker? and cold you explain swappiness
Click to expand...
Click to collapse
It depends, try it out and see how it works for you. Every person uses their phone differnetly, so for some it is an improvement, for others it is not.
And "swappiness" means the actual amount of data being swapped...
ie:
I have my linux-swap partition at 200MB, and my swappiness set at 96MB, meaning that only 96MB of data are actually being swapped on to the SD card.
Now, I don't use swap at all myself on donut, I stick to compcache or nothing depending on what the chef decided to do. If it uses swap out of the box, I will turn it off and put it onto compcache for a donut build.
Before you start playing around with swap, maybe get a task killer installed and use it sparingly (Android runs better when you don't kill stuff because of the way it is designed, but there is a limit, so task killers are nice, especially to kill something like music player or video player running in the background) This will speed things up just by keeping heavy CPU/RAM use programs actually fully closed.
Also, how slow is slow? At first, any ROM fly's on snapping back etc... but they all slow down a bit, some more than others. Actions should not and will not be instant, they should take time... not 15 seconds, but if it takes a second to load the home screen, so be it, that is damn good my friend.
Related
Hey guys,
I've got a little problem for over a few months, so I thought why not ask it on XDA maybe all those smart guys know a solution!
Problem is that when i'm in a program (mail, music, sms, or any other app / game) and I press the home button, it always takes about 15 to 20 seconds before it's fully loaded. First after 3 seconds you see the blank background. Then the icons come back after like 13 seconds, then the widget(s) (i only have 2) and finally after some more seconds waiting it's all usable.
Well, it's a pretty annoying problem, everytime i have to look for something fast, I have to wait those 20 seconds. I can't find a solution, here is what i've already done:
1. It started with the CM 4.xxx roms so I wiped installed it again -> nope didn't work
2. Fully wiped everything including the ext partition and flashed Super D -> nope
3. Since CM 5 is out, wiped again and flashed CM5 -> nope...
The weird thing is, that when I freshly installed one of those roms, it seems to work but after a few app installs and phone useage, it starts lagging loading the home screen. And in 2 days it becomes worse untill every press is a looong load time!
I've got an Transcend 8GB Micro SD which is class 6 (should be enough). It was standard delivered with my T-Mobile G1. The ext partition is 457MB large (and there is 351 free space on it). Internal on the phone is now 21MB free. But even with 70 free it won't work...
I don't have swap enabled now with the new CM, but I did had it with Super D so that also doesn't seems to work. I've got Compcache enabled now. I REALLY don't know what to do... it just sucks that it takes so long to load, I hope anyone of you has a solution
Thanks!
Here is my approach:
In spare parts enable both comp cache (you indicated this is done) and launcher in memory.
The hope is launcher will not need to usually fully reload but can be compressed into the compcache when not is active use.
This applies to cm 4.2 and cm 5 on the dream.. every now and then the system will still kill the launcher if memory is tight so don't be shocked at it fully reloading from tike to time.. but usually it works out and keeps the phone very responsive.
Do not use swap.
(Well if desperate you can try 20-30mb but more than that will not work well with android memory management.. and even that small amount may do more damage to the SD card then actually help the system runtime.. I just don't use swap and attempt to back out of applications when done)
Thanks for the reply, i've done that and hope it will load a bit faster now I'll let u know!
Thanks it works great, my phone just feels so much faster now!
I've noticed that my G1 (Running CM6) tends to run out of RAM fairly often, I was thinking maybe having swap space might help me a bit with this, however I only have a Class 2 SDHC Card (16GB), would I see any performance increment or should I just wait until I can afford a much faster one? (eg. The Kingston Class 10 one)
I would suggest to use no swap at all ... if RAM is too low, try to enable compcache it will help you probably a bit. I noticed a massive performance drop when enabling swap on CM6.
Sent from my Htcclay's Superfly G1 using XDA App
Swap and CM5/6 don't get along. The memory killer in the kernel thinks that swap is actually free RAM and keeps more things open, stopping tasks from being killed at all. If you want to use swap, I recommend you use a donut/cupcake/hero rom that uses a different kernel so that things don't get down to a screeching halt. And anyways, the fastest speed I have ever seen my phone write something from my computer to the phone via USB is 2.7mb/s, compared with 6-12mb/s I get from an sdcard reader. That means that even when your phone is writing at top speed, it is just barely far from the 2mb/s write speed guaranteed by a class 2. You will definately see better performance with swap on a class 4, but anything higher won't benefit your phone much at all, unless you regularly transfer large amounts of files to your memery card via a card reader.
AndDiSa said:
I would suggest to use no swap at all ... if RAM is too low, try to enable compcache it will help you probably a bit. I noticed a massive performance drop when enabling swap on CM6.
Sent from my Htcclay's Superfly G1 using XDA App
Click to expand...
Click to collapse
Compcache didn't improve performance at all, for me at least.
mejorguille said:
Swap and CM5/6 don't get along. The memory killer in the kernel thinks that swap is actually free RAM and keeps more things open, stopping tasks from being killed at all. If you want to use swap, I recommend you use a donut/cupcake/hero rom that uses a different kernel so that things don't get down to a screeching halt. And anyways, the fastest speed I have ever seen my phone write something from my computer to the phone via USB is 2.7mb/s, compared with 6-12mb/s I get from an sdcard reader. That means that even when your phone is writing at top speed, it is just barely far from the 2mb/s write speed guaranteed by a class 2. You will definately see better performance with swap on a class 4, but anything higher won't benefit your phone much at all, unless you regularly transfer large amounts of files to your memery card via a card reader.
Click to expand...
Click to collapse
What if I have a task killer app? Because running out of RAM is just as bad as having too much running...I don't have many apps as I only keep what I actually use as well.
I have to ask, what are you seeing as the symptom of "running out of ram" the system will always use all ram so it will always have nearly none free.
By this I of course mean what is taking forever from you the end users perspective.. from there we can tweek in the right direction or work on making the phone prioritize what is needed to be useful.
Many times people put tons of swap only to find the the problem application is still removed from ram/swap due to configuration and the system is even slower with swap.
Also before enabling swap try the settings -> adw -> system -> system persistent is enabled. (Or equivalent on other launchers)
If you really want to try swap, it wont be fast but in very little amounts
ezterry said:
I have to ask, what are you seeing as the symptom of "running out of ram" the system will always use all ram so it will always have nearly none free.
By this I of course mean what is taking forever from you the end users perspective.. from there we can tweek in the right direction or work on making the phone prioritize what is needed to be useful.
Many times people put tons of swap only to find the the problem application is still removed from ram/swap due to configuration and the system is even slower with swap.
Also before enabling swap try the settings -> adw -> system -> system persistent is enabled. (Or equivalent on other launchers)
If you really want to try swap, it wont be fast but in very little amounts
Click to expand...
Click to collapse
Well, if I have MSN Talk open, the home screen tends to fall out of memory (Yeah, I have System persistent enabled) and Messaging is extremely slow (To the point where a letter appears a good second after I press the key), it's that kind of thing when I run certain programs, it makes it hard to have stuff like JuiceDefender running because I always run out of RAM even just running the Speedtest app then.
So this may be a dumb question but what are the advantages and disadvantages of checking the "lock home in memory" box in the Cyanogen performance settings?
I'm not an Android expert, but from my understanding of it ...
Personally, I'd keep Home locked in memory on the Nook.
On older devices with low memory, you'd want every bit of it free for running applications.
Let's say you had 24 MB of free and usable memory, and your Home was taking up 6 MB. If your system claimed that, that is like getting a quick 25% boost to memory.
However, hitting the Home button would cause the Desktop to take longer to display, as it now had to fight to get some memory back just to load back up.
Keeping Home locked in memory means that it will not give up what it has allocated, so that you can always quickly switch back to it. Since the Nook has 512MB of RAM, I've usually seen something like 180-380 MB free on mine at all times, so I don't worry about releasing the tiny chunk Home claims.
Someone, *please* correct me if I am wrong.
BitingChaos said:
I'm not an Android expert, but from my understanding of it ...
Personally, I'd keep Home locked in memory on the Nook.
On older devices with low memory, you'd want every bit of it free for running applications.
Let's say you had 24 MB of free and usable memory, and your Home was taking up 6 MB. If your system claimed that, that is like getting a quick 25% boost to memory.
However, hitting the Home button would cause the Desktop to take longer to display, as it now had to fight to get some memory back just to load back up.
Keeping Home locked in memory means that it will not give up what it has allocated, so that you can always quickly switch back to it. Since the Nook has 512MB of RAM, I've usually seen something like 180-380 MB free on mine at all times, so I don't worry about releasing the tiny chunk Home claims.
Someone, *please* correct me if I am wrong.
Click to expand...
Click to collapse
Thanks for the reply, this is pretty much what I assumed. If this is the case, and it sounds logical, then I'm bit confused as to why it isn't automatically checked in CM7 anyway.
Default options are weird.
For my old G1, not locking it in memory makes sense. For the newer Nook, locking it in memory would be better.
Other defaults of CM7 include the Camera and Phone app on the Desktop for the Nook. Really?
BitingChaos said:
Other defaults of CM7 include the Camera and Phone app on the Desktop for the Nook. Really?
Click to expand...
Click to collapse
Those apps are tied to strange but important parts of the OS, so they can't be easily removed.
If anyone could help me out here I will love you LONG time:
I am wondering id I should set up a swap partition and use it with this script (apps/data 2 ext, supports swap). I am starting fresh on my Nexus One installing a Gingerbread MIUI ROM using this script for the first time. I was wondering if I should use a SWAP with my class 4 16gig sd card. I will have a 1gb EXT partition. If anyone could state simple pros/cons I would MUCH appreciate it. I have heard good but mostly bad about swap on gingerbread saying that it is not needed and can cause bad.
Does the N1 really need SWAP with Gingerbread? I'm shaking in my pants posting this but I have not seen any related articles, let alone for the N1. I have done a Google search but that doesn't help, it confused me more if it is worth it.
Thanks again. Deuces.
There are some comments from experienced users here on swap, most are against. Here is a link that has a lot of comments--
http://zerocredibility.wordpress.com/2009/08/24/why-android-swap-doesnt-make-sense/
I am no android tech, but never used and don't have issues. I run a lot of apps over a hundred from the Market alone
Thanks! Exactly what I needed. No SWAP for me!
Glad to help--
I'm no expert either. But I do have a 256MB swap partition.
Swap *should* only be used when physical memory is low, and more is still needed by the system. If you're low on memory and need more, then swap might be useful then.
There's a kernel setting called "swappiness". I have this set to a low setting "5", which I believe means that swap should only be used as a last resort i.e. more importance is put on using physical memory over swap.
Yes swap is slower. If a system is swapping out, then it's logical to add more physical memory to the system. However as we cannot upgrade physical memory on our phones, so I suppose swap is the next best thing.
Anyhow that's just my personal thinking. My Nexus is running sweet and I don't notice any considerable slowdowns. However perhaps my swap has never really been required?!
Swap is made for desktop OS, where there is such thing as "lack of memory".
Such thing doesn't exist on Android, mobile OS of completely different design.
The reason is - desktop OS can't kill the tasks you've left running. Mobile OS can, and will, once it senses that it needs more memory. And the tasks themselves are built to be killed.
Adding SWAP is fooling Android that it has more actual memory than there really is - and the OS is using it like it was real memory, not killing tasks when it should. And while doing that, SWAP is far slower than just killing and reloading tasks - because it requires writing to and reading from the SWAP partition the whole app, while when killing and loading it, only reading is required - making the process MUCH faster.
I believe that's the essence of the earlier reference.
Shortly, unless there is severe lack of RAM (and on N1 there isn't by any parameters) - SWAP will make things worse, not better.
By activating compcache (~18% should do), and kernel samepage merging, there is no need for swap. I think texasice confirmed this, although I am not sure.
Sent from my Nexus One using Tapatalk
I would never use swap for GB. Tough there is discussion of using it on ICS, the few times I have tried it I did not use it.
I used swap a long time ago on CM6 or early 7 and there was absolutely no benefit in my opinion. Doesn't swap force more read/write times on SD which can decrease the life as well? That's just my $0.02.
TheAndroidStop said:
I used swap a long time ago on CM6 or early 7 and there was absolutely no benefit in my opinion. Doesn't swap force more read/write times on SD which can decrease the life as well? That's just my $0.02.
Click to expand...
Click to collapse
Swap isn't useful when it's not being used, and FroYo or Gingerbread hardly uses that much RAM. ICS, however, with its full hardware acceleration, is a real memory hog. Now, though, if we enable kernel samepage merging and a zram amount of like 18%, we wouldn't need a swap partition. Like it's been said before, swap is very slow, much slower than actual RAM.
Sent from my Nexus One using Tapatalk
Swap seems as use full as a taskiller in Android....
Sent from my Nexus One using xda premium
Hello, does not swap hard Android phone for auxiliary memory damage the hard?
Hey Guys,
I was just around XDA and I was reading about someone who was saying that the Ram Swap have the "opinion" to not be useful at all but someone else who complain about the ram consumption saying that Swap is needed at must if on low Ram, and that was said from Power Users on XDA.
I understand that on High-End Devices this script not have space in the first place but I want to go extreme. Why Not?
Like all we know we have enough Ram to share but we also know that all the latest applications and Games eat a lot of Ram and when they consume Ram in excess Android will kill all the applications in background to let other applications working well.
Let's said that 2GB of Ram (1,66GB effective) it's not much on our Z1 and probably nobody take my idea seriously but I think that after few years when huge applications will come out on our devices, hungry of ram, then you will see that maybe this will help.
So my question is if it will be possible to expand the Ram with Swap on SD to let Android not kill Applications and have more Ram (virtual and real) to share. Like 1,66 real + 1GB Swap?
Do you think it will be a good Mod? It's difficult to make it real? It will be ever available on our Z1?
Well the Z1 only has 11gb or usable internal memory and i wouldnt want to make 1 or 2 of that useless just in case i run out of 1.7gb of ram on the device which doesnt happen very often. and the other thing is if you actually make a swap partition and manage to set it up , then when you run out of ram and device start to use the sd card or the external sd (which i think is even slower) as a ram the phone will start to run extremely slow compare to normal. i think swap partition make more sense on a linux production machines or a server when you cant afford any programme to be shut down. having said that if the mod is ever going to be availible ill probably make 500Mb swap just incase
Yes it is possible to make a swap partition on the Z1, just don't bother with it. Swap is really slow, your apps won't get killed but it will take a very long time to open them again since your internal memory/sd-card is that much slower than the RAM in your device.
You could try messing around with the Android minfree settings but other than that, deal with it. Try searching on Google for some tutorials on customizing your minfree settings.