Linux-swap Cynanogen? - G1 Q&A, Help & Troubleshooting

ok so i made a linux-swap partion on my sd card that is 64mb. Now do i need to activate it somehow? or does cynogen do it for me? i tried to search but couldnt find. also do i need update my radio? it is 2.22.19.26I

You need user.conf and userinit.sh files on your ext partition. There's a guide on how to set that up here.

ok and can i have compcache and linux-swap at the same time? or do they do the same thing? also do i need to make a partion for compcache? and i cant find the htc keyboard in 4.2.3.1, does it come with it?

i thought if you have 4.2.3.1 you didnt have to add the files as it does everything for you? am I missing something.

is compcache and linux swap the same thing? and do we need both?

nahanee20 said:
is compcache and linux swap the same thing? and do we need both?
Click to expand...
Click to collapse
lol, no.
Swap is virtual memory. It uses a seperate partition to act as extra RAM, but it's nowhere near comparable to real RAM.
Compcache compresses what's in the RAM, so there's more space to cram files in. The problem is constantly compressing and decompressing files in RAM puts a heavy strain on the CPU.

so do i need to put the usernit files on or did this rom already do it?

does anyone know how to use the user.config app to do this?

nahanee20 said:
does anyone know how to use the user.config app to do this?
Click to expand...
Click to collapse
You DO NOT have to add any user int files to your sd for swap to work.
Its already rolling if you installed correctly.
go to terminal and use the print command to view your allocated spaces for each ext

Better yet, use the "free" command to see if it is really being used. I am pretty sure Cynanogen does not use a swap partition by default. It needs to be enabled. A easy way to check and setup your swap it to download swapper.

When I type free in the terminal I see 0 for total, used and free swap. I made an ext4 and a 32mb swap partition on my sd card. How do I enable swap on Cyanogen 4.2.5?

beav_35 said:
When I type free in the terminal I see 0 for total, used and free swap. I made an ext4 and a 32mb swap partition on my sd card. How do I enable swap on Cyanogen 4.2.5?
Click to expand...
Click to collapse
search user.conf app on market

Related

Best settings for CyanogenMod

Hey guys can you suggest me the perfect settings for my 2GB sd?
Do I need to use Swap? (now I have 64 mb of swap)
What kind of EXT it's best? (now I have ext4)
Thank you!
Krishath said:
Hey guys can you suggest me the perfect settings for my 2GB sd?
Do I need to use Swap? (now I have 64 mb of swap)
What kind of EXT it's best? (now I have ext4)
Thank you!
Click to expand...
Click to collapse
I believe ext4 is best, as it's the newest linux filesystem. I'm currently using ext3, because most ROMs don't support ext4, but I'll probably upgrade soon.
As for swap, I also have a 64mb swap partition, but default it isn't utilized. CompCache is already enabled, but I'd also like to know how to enable it.
EDIT: Swap requires a userinit.sh I'm about to try it out...
AdrianK said:
I believe ext4 is best, as it's the newest linux filesystem. I'm currently using ext3, because most ROMs don't support ext4, but I'll probably upgrade soon.
As for swap, I also have a 64mb swap partition, but default it isn't utilized. CompCache is already enabled, but I'd also like to know how to enable it.
EDIT: Swap requires a userinit.sh I'm about to try it out...
Click to expand...
Click to collapse
Yeah but what it's the best setting for this ROM?
EXT4 + SWAP 64MB are alright?
So swap partition isn't used by default? How we "activate" it?
Krishath said:
Yeah but what it's the best setting for this ROM?
EXT4 + SWAP 64MB are alright?
So swap partition isn't used by default? How we "activate" it?
Click to expand...
Click to collapse
Isn't much difference between ext3 and ext4. Cyanogen himself uses ext4, so...
You need to make a custom userinit.sh, follow that guide I posted.
Swap size probably doesn't matter too much, as long as it's not too big. 64 will be fine, any speed increase from a different size will be minimal.
This is how I'm running 4.0.4...
- 32MB Linux Partition - enabled using Swapper.
- 528MHz set ALL the time - enabled using SetCPU(Makes the UI sooo much smoother. Didnt really notice a difference in battery life either).
Using userinit.sh I enabled CompCache with linux swap on a 64 partition and it does seem smoother. Also switched to ext4 now, don't really see a difference.
Will try it now
AdrianK said:
Using userinit.sh I enabled CompCache with linux swap on a 64 partition and it does seem smoother. Also switched to ext4 now, don't really see a difference.
Click to expand...
Click to collapse
Can you post your usernit.sh?
AdrianK said:
Using userinit.sh I enabled CompCache with linux swap on a 64 partition and it does seem smoother. Also switched to ext4 now, don't really see a difference.
Click to expand...
Click to collapse
i would suggest you stick to ext3 because it's more commonly used as of right now... also 64mb is a good sized partition, and linux swap is good, but compcache and Backing Swap is a lot better...
prince.siraj said:
i would suggest you stick to ext3 because it's more commonly used as of right now... also 64mb is a good sized partition, and linux swap is good, but compcache and Backing Swap is a lot better...
Click to expand...
Click to collapse
Can I have some "made" files to put in my SD card? I have a "normal" 2GB microsd card with 64 mb of swap... I'd be glad for this
I really dont see anything wrong with ext4, Ive had a look in a few rom release threads and most of them have support for it. I use cyanogen mod 99% of the time anyway...
Krishath said:
Can I have some "made" files to put in my SD card? I have a
"normal" 2GB microsd card with 64 mb of swap... I'd be glad for this
Click to expand...
Click to collapse
Are you talking about userinit.sh and user.conf? Just follow the link I posted earlier, took me about 10 minutes to set up.
for swap dont go over 45mb. i honestly can notice the dif. i us my g1 as a test dummy. ext2,3,4 honestly does not make a dif in my eyes. i have tried all. i use linux mint to partition my sd. which by the way is the easiest and sickest way to partition. just had to put that out there for lin users. root root lol!! but ya. over 45mb makes me feel its really trying to find the swap space. try it and give me your opinion. i have partitioned my sd from recovery mkpartfs, windows partition to linux partition editor. ya. trust me. i currently use 40mb swap. that is what really matters. use at ur comfort and day to day usage. fosho!!

Removing SWAP

I am running the latest WES Build Y .. He stated that SWAP slows down phone and in his next release, he is going to remove SWAP.. Just curious how do i follow up on making sure swap is not enabled..
I have User.conf, and the other user.init on the SDCARD and i also have a HUGE file @ 62MB that is called something like SWAP???? ... If i delete all three will that remove SWAP completely?
tearsphere said:
I am running the latest WES Build Y .. He stated that SWAP slows down phone and in his next release, he is going to remove SWAP.. Just curious how do i follow up on making sure swap is not enabled..
I have User.conf, and the other user.init on the SDCARD and i also have a HUGE file @ 62MB that is called something like SWAP???? ... If i delete all three will that remove SWAP completely?
Click to expand...
Click to collapse
I would remove the swap file and the swap partition. The user.conf and userinit.sh do more than control swap
remove the partition too... ??
Therefore, I would have only 2 partitions.. ( Fat32 and Ext3 )
That right ?
tearsphere said:
remove the partition too... ??
Therefore, I would have only 2 partitions.. ( Fat32 and Ext3 )
That right ?
Click to expand...
Click to collapse
Yeah, but if you don't want to repartition you'll have some empty space on your sdcard (how ever big the swap partition is) until you do partition again

swap partition Q

i repartitioned my sd card with a 64mb swap,2gb ext2 and the rest fat32 using ra recovery. im running cyanogen 4.2.13. when i type 'free' into terminal it says 0 for total,used, and free. am i missing something? or do i need to "activate" the swap partition? TY
here you go
forum.xda-developers.com/showthread.php?t=542899
remember search is your friend
i came across this great site about swapping: http://wiki.cyanogenmod.com/index.php/Compcache
im wondering what other options others on this forum use and which one is the most recommended?
compcache
swap
or
backing swap
ty
backing swap seems to be the way togo, but i would like a professional opinion.
2GB its too much for an EXT partition.....i have seen (somewhere) that the recomended size its 512mb...not sure tought...
About the Swap...idk, but i like Compcache...some devs (like WG) says that their roms runs better without Swap.
EDIT:
Here is what i was talking about the EXT partition.
This was on [Guide] Partition your Sd Card, Upgrade to Ext3, and Install Apps2SD.
nephron said:
Partition Fat32/Ext2 with App2SD
Open up Apps2SD
It will show you a screen telling you that your card is not partition and you will have a sliding bar to choose the amount of space you want for an EXT2 partition
I suggest a max of 600mb for EXT2 space (I use 500mb)
Press Ok
You will get a Force Close screen DONT PRESS FORCE CLOSE PRESS WAIT
You will get a reboot message, Press Reboot
You now have a EXT2 partition
Click to expand...
Click to collapse
is there a specific reason to not have a large ext2 partition? i wanted to have plenty of room for both apps2sd and installing debian. im using this guide:
http://all-google-android.com/googl...verdale's-debian-boot-v-2-0-updated-03092009/
the thing i like about this one:
" this will run a full Linux distribution (Debian) on the Linux partition of your sdcard (EXT2/3/4). I have written the script to bind Debian folders to your regular folders, and thus give you access to the entire system while running Debian"

CM5 T5: Disabling SWAP, HELP!?

I am having touble disabling swap. I turned off swapper, deleted the .swp file, turned swappiness to 0 in swapper to disable it.
I even tried
su
swapoff /dev/block/mmcblk0p3
Click to expand...
Click to collapse
In terminal, and nothing...
When I go into terminal and check.
su
free
Click to expand...
Click to collapse
It shows I still have swap on.
Can anyone point me into right direction. Or tell me how I can grab userconf file and edit that to disable it.
I really dont want to repartition all over again...
First do
cat /proc/swaps
to make sure that swap in in the the correct place. When i did it I found that it was not in the same place as it was before.
Mines in /dev/block/ramzswap0 not /dev/block/mmcblk0p3
dont have to fully repartition, just grab a ubuntu live cd, and use gparted to blank out the swap partition.... if theres no swap partiton, and no swap file, then there's NO WAY to have swap on... or if you know what your doing boot into recovery and use the CLI gparted there to blank the swap space...
garz said:
I am having touble disabling swap. I turned off swapper, deleted the .swp file, turned swappiness to 0 in swapper to disable it.
I even tried
In terminal, and nothing...
When I go into terminal and check.
It shows I still have swap on.
Can anyone point me into right direction. Or tell me how I can grab userconf file and edit that to disable it.
I really dont want to repartition all over again...
Click to expand...
Click to collapse
Typically, to disable swap, you need to undo what you did to ENABLE it.
And CM does NOT automatically set up swap, so you would have had to intervene manually.
ALTERNATIVELY, you have, not swap, but COMPCACHE -- is you "swap" showing as 24 MB? If it is, you can just go into spare parts to disable it.
I'll ditto that
lbcoder said:
Typically, to disable swap, you need to undo what you did to ENABLE it.
And CM does NOT automatically set up swap, so you would have had to intervene manually.
ALTERNATIVELY, you have, not swap, but COMPCACHE -- is you "swap" showing as 24 MB? If it is, you can just go into spare parts to disable it.
Click to expand...
Click to collapse
Yup, same here with CM7.2, was amazed to find that swap was supposedly still on, but it was compcache I was really worried I'd have a wrecked sd card on my hands

what is need partition SD card?

"Its recommend to partition your sdcard before flash"
whats the use?..........
you can use cwm with the phone or minitool partition wizard with the pc
venkatarajeev131 said:
"Its recommend to partition your sdcard before flash"
whats the use?..........
Click to expand...
Click to collapse
the rom maybe containing a2sd script that's why it need a second partition do it there is no harm
What size this partition should be? 100MB is enough?
felipevsw said:
What size this partition should be? 100MB is enough?
Click to expand...
Click to collapse
atleast 512 mb for ext parttion you should create a swap partition of 256 mb,
swap will replace the ram according to the swappiness set by you
dhlalit11 said:
atleast 512 mb for ext parttion you should create a swap partition of 256 mb,
swap will replace the ram according to the swappiness set by you
Click to expand...
Click to collapse
So it should be 2 partitions: one with 512 MB and another with 256 MB... The one with 512 should be formatted ext4? and the other swap (of course)?
felipevsw said:
So it should be 2 partitions: one with 512 MB and another with 256 MB... The one with 512 should be formatted ext4? and the other swap (of course)?
Click to expand...
Click to collapse
Set it as ext2, it's faster.
---------- Post added at 08:15 PM ---------- Previous post was at 08:06 PM ----------
dhlalit11 said:
atleast 512 mb for ext parttion you should create a swap partition of 256 mb,
swap will replace the ram according to the swappiness set by you
Click to expand...
Click to collapse
Here's some info on how Linux (and thus Android) uses swap. http://www.linux-tutorial.info/modules.php?name=MContent&pageid=89
I wouldn't bother with it on a phone since Linux will just swap unchanged files right back to where they are on the phone storage without the need for a swap file and since it's unlikely that you'll ever multitask large user files on it there really is no need for it.
felipevsw said:
So it should be 2 partitions: one with 512 MB and another with 256 MB... The one with 512 should be formatted ext4? and the other swap (of course)?
Click to expand...
Click to collapse
swap is optional but it's good to have
dhlalit11 said:
swap is optional but it's good to have
Click to expand...
Click to collapse
For what? Who is changing large data files on their phone? In all likelihood it will cost you more memory to have a swap file than it will save you memory since it won't be used.
Linux won't use it at all if the file in memory hasn't changed since it was last read from storage, it will just swap it back to where it was last read, that is, if you have an app open and more memory is needed linux will first check to see if the file has been changed since last read and since it's an app it will just link it back to where it was read from in the first place rather than to put yet another copy in swap.
Jinxxed said:
For what? Who is changing large data files on their phone? In all likelihood it will cost you more memory to have a swap file than it will save you memory since it won't be used.
Linux won't use it at all if the file in memory hasn't changed since it was last read from storage, it will just swap it back to where it was last read, that is, if you have an app open and more memory is needed linux will first check to see if the file has been changed since last read and since it's an app it will just link it back to where it was read from in the first place rather than to put yet another copy in swap.
Click to expand...
Click to collapse
am not talking about swap file am talking about swap partition and if you think there is no need then why are there paid apps like swapper for root and why are people paying for them.
suppose you are playing shadow gun with help of cf3d after the play you find that all the app like launcher background working apps are stopped due to low ram but if you have swap then the app's memory will move to swap partition and it will not close
when I had mini I had a swap partition of 512 MB and it was really working and if you think the life of SD will decrease then you should know that it has a veeeeeery lil effect on life so don't worry there is no harm
Thank u for this useful thread..
dhlalit11 said:
am not talking about swap file am talking about swap partition and if you think there is no need then why are there paid apps like swapper for root and why are people paying for them.
suppose you are playing shadow gun with help of cf3d after the play you find that all the app like launcher background working apps are stopped due to low ram but if you have swap then the app's memory will move to swap partition and it will not close
when I had mini I had a swap partition of 512 MB and it was really working and if you think the life of SD will decrease then you should know that it has a veeeeeery lil effect on life so don't worry there is no harm
Click to expand...
Click to collapse
Whether you use a swap file or partition is irrelevant, Linux can use either and they work exactly the same.
In your example, all the apps would be swapped RIGHT BACK TO WHERE THEY ARE STORED since they did not change since last read, the swap would be unused and the apps would still be swapped.
I don't know if it's that you fail to comprehend the simple subject or refuse to read both what i post and what i link to but you are not understanding this.
Of course it won't affect the SD cards lifetime, it won't be used.

Categories

Resources