I am currently using JACHeroski 2.7.3
I don't quite understand the system of linux swap.
I have made the linux swap partition but I don't know how to activate the partition. Is it the same as using Swapper?
How about the old Swapper app? Do I have to uninstall it if I use the linux swap partition?
Regards
Linux Swap is activated on boot automatically as long as you have the partition set up. It follows the same principle as swapper, but its a little faster. I would download the new 2.7.4r2 as it uses compcache in addition, making it even faster still.
You don't need to uninstall swapper, but its no longer necessary as its all automatic at this point.
You can check whether the linux-swap partition is working (don't turn on swapper or you won't be able to tell) by going into terminal and typing:
$su
#free
If you get zeros in the swap line, then its not working, anything other than zeros, and you're golden
Great! Now I understand perfectly
Related
hey guys, i would just like to make sure that my settings are correct. i have a 32mb linux-swap partition.
im running cyanogen ROM and my swap place (on swapper) is /sdcard/swapfile.swp
Under advanced preferences, i checked the option of "Use Swap Partition" with the swap partition of dev/block/mmcblkop3
i always get a swapfile.swp in my fat32 partition.
thanks
Pretty sure linux-swap is automatic with the cyanogen's...
Nah, compcache is automatic on all new cm roms, but I found that it causes me the coma issuse on wake with it so I just use swap for it instead
ok im confused. so swapper and compcache do the same job? if so, then ill just uninstall swapper
rpesigan6 said:
ok im confused. so swapper and compcache do the same job? if so, then ill just uninstall swapper
Click to expand...
Click to collapse
If compcache is automatic, and you want to use linux-swap, you need to extract the user.conf from /system/bin, change the settings (the instructions are in there), and then push it back over. But if you're already satisfied with the performance, leave the tweaking to those who are more knowledgeable.
yeah im satisfied with the performance. ok i just uninstalled swapper. so about compcache.... correct me if im wrong, but my cache is currently being stored into my internal memory. i believe this is so cause i would always have to go to manage applications to clear cache
compcache has nothing to do with your caches. Compcache is a set of modules that compresses paged data to allow you to "extend' the available memory. goto google, apply fu.
Hello!
I have a G1 using CM 4.1.999, and my microSD is partitioned with an ext4 for apps2sd and a 64MB linux-swap partition.
I am using the user-configurable userinit.sh with user.conf.
I am trying to understand the cc_disksize and cc_memlimit settings.
My understanding is that it used to be that no matter how I set these I will get a compcache of 15% of total RAM with a backing swap using the entire linux_swap partition.
But I am a bit confused as this rom has compcache 0.6, and I am not sure if that limitation still applies after .5x.
If that is the case, I want to confirm... if I set cc_disksize to 0 and set cc_memlimit to 32, I will get a RAM compcache of 32MB, and it will use the entire linux_swap partition as backing swap.
Is this correct?
Thanks for any help you can give me in understanding this!
Sorry for the bump, but I'm hoping a little more clarification might be a little more answerable...
Well i cant give you a definitive answer, but i can point you in the right direction.
If you don't get much help here, you can try PM'ing miketaylor00
he spent considerable amount of time talking about the subject and his user.conf is implemented in JACxROM
you can send him a link to this q&a and maybe he'll help you out. im sure a lot of people would like more clarification
i also believe the defaulting to 15% of ram was fixed in 0.6 compcache
i havent messed with these settings much. i messed around with them when they first came out but stopped after 0.6 and just started using whatever was included default in the rom. swappiness was pretty much the only settings i changed
bradycl_84043 said:
Hello!
I have a G1 using CM 4.1.999, and my microSD is partitioned with an ext4 for apps2sd and a 64MB linux-swap partition.
I am using the user-configurable userinit.sh with user.conf.
I am trying to understand the cc_disksize and cc_memlimit settings.
My understanding is that it used to be that no matter how I set these I will get a compcache of 15% of total RAM with a backing swap using the entire linux_swap partition.
But I am a bit confused as this rom has compcache 0.6, and I am not sure if that limitation still applies after .5x.
If that is the case, I want to confirm... if I set cc_disksize to 0 and set cc_memlimit to 32, I will get a RAM compcache of 32MB, and it will use the entire linux_swap partition as backing swap.
Is this correct?
Thanks for any help you can give me in understanding this!
Click to expand...
Click to collapse
Yes, your assumptions are correct. If you have backing swap enabled it will use the entire swap partition. You can check the stats with this command:
Code:
su
rzscontrol /dev/block/ramzswap0 -s
The disksize value when you have backing swap enabled should always equal the size of the swap partition. I recommend a 32MB swap partition if you are using a ROM that doesn't have BFS and a 64MB swap if it does have BFS.
The memlimit is the amount of uncompressed data that can be used by compcache. It usually compresses down to about 20-25% of the uncompressed size so with a 32MB setting it will only use about 5-8MB of RAM. I've been using a 32-48MB memlimit lately and it works great. If you are on a BFS ROM I would go with 48MB. I believe that CM is using BFS I just wanted to give the info for both in case someone else reads this down the road. There is a lot of info about the stats on this page.
http://code.google.com/p/compcache/wiki/StatsExplained
If you have any more questions shoot me another PM. I hope this helped.
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
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"
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