okay i just formatted my sd and i put 1g of memory on the swap and ex2, thats taking up 2g outa my 4g. does anything save on the swap? im just wondering this because i wanna free up as much memory as i can for saving pictures and music.
None of the roms out at the moment use the swap partition.. and the ext2 partition is for apps2sd.. I use 512 ext2 but no one needs that much. And swap you can set at 0 until the roms use it.
Hope this helps.
Redneck101 said:
okay i just formatted my sd and i put 1g of memory on the swap and ex2, thats taking up 2g outa my 4g. does anything save on the swap? im just wondering this because i wanna free up as much memory as i can for saving pictures and music.
Click to expand...
Click to collapse
You had no reason to change anything from the defaults. Go back and re-do it.
Redneck101 said:
okay i just formatted my sd and i put 1g of memory on the swap and ex2, thats taking up 2g outa my 4g. does anything save on the swap? im just wondering this because i wanna free up as much memory as i can for saving pictures and music.
Click to expand...
Click to collapse
Swap file will not be usable until we get Source code for the kernel. SWAP = Linux version of a page file. = Hard Drive based RAM. Kind useless on a phone. I doubt it will make leaps and bounds of difference when we actually get it. You can set swap to 0 and apps to 512. If you use more than 512 for apps, you are a pack rat and probably cant find anything and don't use what you have IMHO.
Kcarpenter said:
Swap file will not be usable until we get Source code for the kernel.
Click to expand...
Click to collapse
Uh. no. Swap works now. There's even an application on the market that will set it up for you, as long as you have the swap partition on your sdcard. Allows you to enable and disable it, and so on. It's not hard to set it up, then adb into the phone and verify it's actually doing something.
SWAP = Linux version of a page file. = Hard Drive based RAM.
Click to expand...
Click to collapse
No, not really. Swap is not additive to your real RAM.
Kind useless on a phone. I doubt it will make leaps and bounds of difference when we actually get it.
Click to expand...
Click to collapse
Depends. Having swap enhances memory management, as it allows you to page stuff out of *real* RAM when it's not in use, and only bring it back when a page fault forces you to. It can also really beat you up, if memory pressure is forcing so many faults that the kernel spends all its time moving memory around instead of allowing processes to actually run.
You can set swap to 0 and apps to 512. If you use more than 512 for apps, you are a pack rat and probably cant find anything and don't use what you have IMHO.
Click to expand...
Click to collapse
Additionally, even applications installed to the sdcard use SOME space in /data. You'll overrun the filesystem in the phone before you overrun a 512 mb partition.
Related
I set it all up forever ago, but thought nothing of it.
Not sure what you're asking, but opening a terminal and type "free" should tell you if swap is enabled/used.
I see ers mem and the 584 swap... wish I could understand the numbers that show up better (seems like there should be more free to me).
I had 2732 free memory and 8968 swap.
what other cool things can I find out in Terminal (like by typing in "free").
s15274n said:
I see ers mem and the 584 swap... wish I could understand the numbers that show up better (seems like there should be more free to me).
I had 2732 free memory and 8968 swap.
what other cool things can I find out in Terminal (like by typing in "free").
Click to expand...
Click to collapse
df shows the amount of memory used in each of the system's partitions
Type "busybox" to see busybox commands, then type one of those commands to find out what it does
Well I entered 'free' in terminal emulator, and there's what I got
$ su
# free
total used free shared buffers
Mem: 97916 96364 1552 0 292
Swap: 0 0 0
Total: 97916 96364 1552
So does this mean it's NOT working?
Yep, its not working.
phuKKah said:
So does this mean it's NOT working?
Click to expand...
Click to collapse
Yep, its not working.
Download swapper from the market, its the simplest and quick way to get it working.
Hth
Swapper worked
anyone know recommendations about swap sizes? like what size is good for what kind of use? I can go from there
Edit: I meant swappiness
phuKKah said:
Swapper worked
anyone know recommendations about swap sizes? like what size is good for what kind of use? I can go from there
Edit: I meant swappiness
Click to expand...
Click to collapse
personally I find higher swappiness is better.
currently running CM 4.2.8.1 w/ 132MB swap partition + 10MB CC mem_limit and swappiness of 100. Runs great.
On Linux env I remember (coudl be wrong) swap should be 1/4 your ram, dunno if being more it's worse. So 64k should be enough.
Personally I've found 96k swap and swappines 40 the right balance.
gdbjoe said:
On Linux env I remember (coudl be wrong) swap should be 1/4 your ram, dunno if being more it's worse. So 64k should be enough.
Personally I've found 96k swap and swappines 40 the right balance.
Click to expand...
Click to collapse
Weird, because on Windows it's supposed to be 1.5-2 times your RAM o.0
could you please explain what linux-swap is and these terms swippiness and swap
asb123 said:
could you please explain what linux-swap is and these terms swippiness and swap
Click to expand...
Click to collapse
Chances are that if you don't know about it, then you don't need it
However, it is just a partition on your sdcard that the phone uses for memory. This is mostly used on hero roms where the phone doesn't have enough memory to have all of its functions on at once. Swappiness is the percent that the system uses that partition as memory (i.e. If swappiness is at 80 then it will use the partition 80% of the time and phone memory 20% of the time
JAguirre1231 said:
Chances are that if you don't know about it, then you don't need it
However, it is just a partition on your sdcard that the phone uses for memory. This is mostly used on hero roms where the phone doesn't have enough memory to have all of its functions on at once. Swappiness is the percent that the system uses that partition as memory (i.e. If swappiness is at 80 then it will use the partition 80% of the time and phone memory 20% of the time
Click to expand...
Click to collapse
I c , thanks for the explaination. You are right now that i know what it does i dont think i need it as i will not be running hero.
asb123 said:
I c , thanks for the explaination. You are right now that i know what it does i dont think i need it as i will not be running hero.
Click to expand...
Click to collapse
it's always nice to have. For example, when you launch the browser after, say, viewing an email, the last session would have been cached so you won't have to reload the page.
gonintendo said:
it's always nice to have. For example, when you launch the browser after, say, viewing an email, the last session would have been cached so you won't have to reload the page.
Click to expand...
Click to collapse
wait, this phone does not support this feature normally but does with this mod?
im rooted with cyanogen 4.2.14..(just below the latest version) and i cant get my swap to turn on...cant find swapper on market...can anyone give me a link to the apk file...i did the 10mb ram hack but still fone is slow...if i cud only get the swap on
mehdiharoon said:
im rooted with cyanogen 4.2.14..(just below the latest version) and i cant get my swap to turn on...cant find swapper on market...can anyone give me a link to the apk file...i did the 10mb ram hack but still fone is slow...if i cud only get the swap on
Click to expand...
Click to collapse
In the time it took you to type this you post this you could have went to google and typed "swapper for android" and you could have found it yourself. Since I'm not a complete asshole I will give you the link http://code.google.com/p/a-swapper/
Can't see that this has been asked already so I'll go ahead and be prepared to be flamed/ignored...
With apps2sd we don't seem to fill up our internal storage anymore so is it just being wasted? Would it have any benefit to use a bit of it for a swap file rather than have that going to the sdcard. I'm working on the assumption that the internal storage is faster than a class 6 but I may be wrong.
This is how we did it before everyone had swap partitions.. You can use a swap file on the internal memory but its slightly less efficient than a dedicated swap partition. There's really very little difference tbh.. Having the swap partition is just neater.
goldenarmZ said:
This is how we did it before everyone had swap partitions.. You can use a swap file on the internal memory but its slightly less efficient than a dedicated swap partition. There's really very little difference tbh.. Having the swap partition is just neater.
Click to expand...
Click to collapse
I see. Thanks for the reply. I find swap really bogs things down after a few days so I guess I'll continue to just use compcache (and wait for the desire to be released)
i'm gonna root my phone tomorrow and i wanted to know i got a 8gb card and i want to keep 2gb for storing apps and games...how do i allocate that space? does it automaticaly become open or do i have to allocate space
you have to partition the sd card once you've finished the root process. most of the current recovery images have the ability to do so built in. by the way, 2gb is a hell of a lot more than you're going to need for apps and games unless you're planning on installing 500+ apps. I have close to 100 apps and 10 or so games on my G1 and I'm using maybe 250mb.
kusotare said:
you have to partition the sd card once you've finished the root process. most of the current recovery images have the ability to do so built in. by the way, 2gb is a hell of a lot more than you're going to need for apps and games unless you're planning on installing 500+ apps. I have close to 100 apps and 10 or so games on my G1 and I'm using maybe 250mb.
Click to expand...
Click to collapse
oh ok thanx...i want to keep 2gb space so that my phone doesnt become slow
djteotancolis said:
oh ok thanx...i want to keep 2gb space so that my phone doesnt become slow
Click to expand...
Click to collapse
However something about the way apps2sd is implemented makes the phone slow if you allocate a huge ext2/3/4 partition think absolute Max at about 610mb. Regardless of SD size.
ezterry said:
However something about the way apps2sd is implemented makes the phone slow if you allocate a huge ext2/3/4 partition think absolute Max at about 610mb. Regardless of SD size.
Click to expand...
Click to collapse
thank you for the information i didnt know that
a large sized partition for apps will not make your phone any faster. depending on what ROM you choose to install, having a third partition for swap will make it faster. however, there are roms out at the moment (like cyanogen's latest) that do not recommend using swap because of how aggressively it will be used if implemented. in other words, some roms swap is bad because it will suck the life out of your sd card like a damn vampire, and not one of the gay sparkly ones from twilight.
After many tests I think that we really suffer from a lack of RAM. But the internal memory (NAND) should be the same speed as RAM I think. So why we don't use another 128Mb of NAND as additional RAM? A sort of swap part, but used as RAM and not as normal swap....
If someone related to the kernel would answer is it possible or not, it would be good)
DiMiK said:
After many tests I think that we really suffer from a lack of RAM. But the internal memory (NAND) should be the same speed as RAM I think. So why we don't use another 128Mb of NAND as additional RAM? A sort of swap part, but used as RAM and not as normal swap....
If someone related to the kernel would answer is it possible or not, it would be good)
Click to expand...
Click to collapse
Using it as RAM would propably require major changes to the kernel if it is even possible which I doubt it is. Using it as swap would be the possible alternative and I pretty sure that is very possible and would help performance but at a cost.
1. You would either have very little left for system and data or you would have to put system and/or data on the SD-card and that alone may make you lose anything you gain from putting swap on NAND.
2. I actually asked the swap-on nand question myself and well, we can't replace our NAND, at least not easily and swap is I/O intensive and intesive I/O will sooner or later wear out the NAND. So basicly this is not a good alternative unless you want to turn your phone into a paperweight sooner than you had planned.
So what we can do is using compcache and/or swap on SD-card. The easiest thing is to just enable some compcache. It uses RAM as swap and uses compression on the contents so we can hold more things in RAM that we would usually be able to. This means Android can keep more apps in "sleep" allowing for faster switching between apps but it will also decrease the possible amount of available RAM for the active app. I usually turn on compcache with the default setting which is to use 25% of the RAM for compressed swap. It might be placebo but IMHO it feels a it "smoother" to use after that.
Another alternative is to use a swap partition in the sdcard. Just using swap means you do not need to load any compcache kernel modules and there is no compression taking place so it's a good alterantive. However you need know your way around partitioning SD-cards to get this running so it's not as easy as just enabling compcache (assuming the build supports compcache).
For the really advanced you can enable compcache with backing swap. It means it uses a certain amount of compressed swap i RAM and when it runs out of space there it starts putting stuff on the SD-card swap partition. Once again, a bit tricky to setup but may be the best alternative.
Read more about it here: http://wiki.cyanogenmod.com/index.php/Compcache
kallt_kaffe said:
I usually turn on compcache with the default setting which is to use 25% of the RAM for compressed swap. It might be placebo but IMHO it feels a it "smoother" to use after that.
Click to expand...
Click to collapse
It make good effect: more applications can run simultaneously.
Hi,
I was looking for and answer, but i can find anything.
So i have 2 questions about swap.
1. Can i have multiple swap files? Like eg. Zram+other swap file? Or two swap files (one on /cache other on /sdcard). Made via 2 apps. One (on internal memory/sdext) would be working all the time, second (sscard) only if i had needed it.
2. Is it possible to lock app in swap? I mean that app should only work using swap - no real ram. I was thinking about music player or some widgets.
Romio.se4m said:
Hi,
I was looking for and answer, but i can find anything.
So i have 2 questions about swap.
1. Can i have multiple swap files? Like eg. Zram+other swap file? Or two swap files (one on /cache other on /sdcard).
Click to expand...
Click to collapse
I think it's possible to activate swap partition + swap file at once, but why you should do that?
You can create swap partition up to 4096 mb OR swap file up to 4096 mb using" ram expander" app from market.
-zram is ram compressor which slows down the device
Made via 2 apps. One (on internal memory/sdext) would be working all the time, second (sscard) only if i had needed it.
Click to expand...
Click to collapse
I didn't understand you, u wanna use internal memory as swap or install swapping app in internal?
(Cm9 roms use internal as swap partitions)
2. Is it possible to lock app in swap? I mean that app should only work using swap - no real ram. I was thinking about music player or some widgets.
Click to expand...
Click to collapse
I never heard something like locking app in swap but might be possible with some advanced RAM managers.
Sent From My BEAST , I mean X8
i guess u can have multiple swaps but you cannot have swap controlled by multiple apps.
kernel should find all swap places and should work according to them.
and u can increase swappiness to lock apps which are not active into swap.
but x8 internal memory is very slow.
our ram r/w speed is about 550MBps
and internal memory speed about 2mbps
so using swap other than zram is not really a good option.
also zram has disadvantages as it uses ram only and increases cpu overhead.
You can have any number of swap partitions or file that you like. Linux will do the job of distributing the swapped data to them and you can sit back and relax. Mind that only way this makes sense is if you got a fast enough sdcard.
Sent from my Galaxy Nexus using xda app-developers app