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
Related
So I'm currently running JACHero 2.7.4r2, and I'm still encountering long loads htc screens and lag. I'm aware that compcache starts up automatically at boot and that its supposed to reduce lag ect, and help the rom smoother and works better than Swap linux. How is it that others are having so much success with their roms performance? Am I supposed to tweak the settings of compcache?
I did some research and this is what I got...
Edit the userinit.sh file you're using. Check the proper threads for compcache in development forums.
As far as Compcache vs swap, I've gone back to no swaps, it seems snappier by itself without these methods. It could be a personal preference though depending on what apps/services you use the most.
Click to expand...
Click to collapse
How do I get to the userinit.sh file? and what are good settings to use?
Also on the first page of JACHeroski2.7.4r2 it also says...
**Please do NOT use userinit.sh for Swap it is already done in this build and that will cause you to have swap issues
Click to expand...
Click to collapse
So I'm a bit confused as to what I'm supposed to do here. I'm also running a 32 swap linux partition, should i keep it? Or Remove it?
Thanks
Mine is running really good on linux-swap.... I'm not switching to CompCache until it's 100% ironed out.
So can we enable compcache? My class 6 might not arrive before I go on holiday (Tuesday) and Im thinking linux-swap will be too slow on a class 2 :-S
AdrianK said:
So can we enable compcache? My class 6 might not arrive before I go on holiday (Tuesday) and Im thinking linux-swap will be too slow on a class 2 :-S
Click to expand...
Click to collapse
Yes, you can enable compcache, its already on by default in 2.7.4r2. He said not to use userinit.sh for linux-swap as he already added command into a2sd.sh. So that's automatic as well. You can check if they're working by going into Terminal and typing:
#cat /proc/ramzswap
#free
#cat /proc/swaps
mines working but still is slow, ect. Is it cause its only experimental?
I think i found my issue, i reset overclock to be default so its NOT overclocked anymore, and i see improvements.
h.nocturna said:
Yes, you can enable compcache, its already on by default in 2.7.4r2. He said not to use userinit.sh for linux-swap as he already added command into a2sd.sh. So that's automatic as well. You can check if they're working by going into Terminal and typing:
#cat /proc/ramzswap
#free
#cat /proc/swaps
Click to expand...
Click to collapse
So compache runs automatically? So no need for a swap partition?
If you have compcache and a swap partition, you're going to have problems. Use one or the other.
goldenarmZ said:
If you have compcache and a swap partition, you're going to have problems. Use one or the other.
Click to expand...
Click to collapse
Or you might try using linux-swap as a backing swap for the compcache. If you wanna find out more, just check out the compcache tutorial thread.
So this is why my newest jacheroski lags that much.. But in the tutorial, there's nothing about disabling the compcache. So how can I remove it, or make linux-swap backing up compcache?
edit: I'd rather disable compcache, because I'm too lazy and not willing to create linux-swap in the future again. (gah, if there's something wrong in what I wrote - sorry, but my english isn't perfect. i'm trying ;p)
BolecDST said:
So this is why my newest jacheroski lags that much.. But in the tutorial, there's nothing about disabling the compcache. So how can I remove it, or make linux-swap backing up compcache?
edit: I'd rather disable compcache, because I'm too lazy and not willing to create linux-swap in the future again. (gah, if there's something wrong in what I wrote - sorry, but my english isn't perfect. i'm trying ;p)
Click to expand...
Click to collapse
It's easier to just delete your swap partition.. boot into recovery, enter console with [alt+x] and do this:
Code:
parted /dev/block/mmcblk0 rm 3
Its easy enough to create a new swap partition in the future.. just follow the instructions in the 1st post of the jachero thread again.
I've not looked into compcache so I'm not sure how to disable that.
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.
I've heard a lot that using swap will eventually kill your sd card no matter what. Is that true ? I am currently using Cyanogen Mod 4.0.4 with 32Mb swap. I flashed JAC's hero yesterday, but reflashed the CM just after an hour cuz it was freaking SLOW. Can anyone tell me another way to speed it up ? I dun wanna reformat the entire SD card to get a bigger SWAP size or change the swappiness since they are very tiring and confusing. I would be glad if someone could show me a detailed tutorial on how to modify all the stuffs about swap like swappiness, compcache with swap, with backing swap,... ( this is really confusing ). Thanks in advance
Ok well you will most likely need to repartition to increase your swap size if you wannas go hero, I would do a 96mb swap. If you need a guide on doing that lemme know but if you did it once it's the same thing again, just change the numbers a bit to allow for a 96mb linuw-swap. Now for changing swappiness the easiest way I think is to goto Terminal Emulator and type: echo 60 > /proc/sys/vm/swappiness
That will give you a swappiness of 60, I would go with 80 or 100 though as it will speed up hero quite a bit. As for killing your sd, don't worry about it cuz it will take over a year and by then I doubt you will have the same phone or sd, and eve if you do it doesn't kill your sd it just shrinks it's maximum size, slowly.
Anything else fire away.
An sdcard can only take some much read/write cycles so eventually it will start corrupting sectors of your sd but it would prob be a long time before you would notice, sd cards are cheap and will be cheaper by the time you wear out your card, as for repartioning, you can use parted in the recovery manager, I do not have the commands for it but if you look in a few posts here, this has been covered a couple times this past week
Hey codani, long time no see, I would stay and chat but I going to play some poker, it was pushed back and I have to get going
Gridlock for president 2016!!!!!!!!!!!!
kitten time mofo
Thanks guys, for all the information. My only last concern is how to change the swap's type, I mean like swap with backing up, compcache with swap, etc
Thanks again.
Well for hero I don;t think you need to bother with anything besides a linux-swap, and honestly I have never tried anything but that myself so if you are really interested in it I would say wait for someone who knows more about backing swap and compcache to reply.
Try a 96mb linux-swap with 100 swappiness and see how that does. Oh btw when you do terminal emulator and adjust the swappiness make sure yout type su and hit enter first.
crpercodani said:
Ok well you will most likely need to repartition to increase your swap size if you wannas go hero, I would do a 96mb swap. If you need a guide on doing that lemme know but if you did it once it's the same thing again, just change the numbers a bit to allow for a 96mb linuw-swap. Now for changing swappiness the easiest way I think is to goto Terminal Emulator and type: echo 60 > /proc/sys/vm/swappiness
That will give you a swappiness of 60, I would go with 80 or 100 though as it will speed up hero quite a bit. As for killing your sd, don't worry about it cuz it will take over a year and by then I doubt you will have the same phone or sd, and eve if you do it doesn't kill your sd it just shrinks it's maximum size, slowly.
Anything else fire away.
Click to expand...
Click to collapse
I've been looking for this forever. Thank you sir!
You wouldn't change swappiness like this in JacHero
If you wish to go with Hero, the instructions on how to format your SD card are right on the first page of JacHero...
If you want a FAAAAST Hero, and I mean FAST... like, 100% usable with no lag hero.... then use 96mb linux swap with 80 swappiness... turn off backing swap and compcache. You'll be blown away at how usable it is.
To do this, format your card as per the instructions, make sure you have 96mb linux swap.... flash the Hero rom. After booting into Hero, go to the market and download "text edit" -
Then...
go to terminal and:
su
rwsystem
cp /system/bin/user.conf /sdcard/user.conf
Open up text edit, press menu, then "open" and select your sd card and open the user.conf file. and set the en_compcache_CC and backing swap to "0" instad of 1, I can't think of the specific names, but it's obvious. Then set linux-swap to 1, and linux swap swappiness to 80. Save the file.. then
back in terminal,
su
rwsystem
cp /sdcard/user.conf /system/bin/user.conf
and that's it, I don't think you need to reboot the phone, but do it anyways... it'll be laggy for about 20 seconds while the swap builds up, then bam, lightning fast.
Hope this helps.
vr24 said:
You wouldn't change swappiness like this in JacHero
If you wish to go with Hero, the instructions on how to format your SD card are right on the first page of JacHero...
If you want a FAAAAST Hero, and I mean FAST... like, 100% usable with no lag hero.... then use 96mb linux swap with 80 swappiness... turn off backing swap and compcache. You'll be blown away at how usable it is.
To do this, format your card as per the instructions, make sure you have 96mb linux swap.... flash the Hero rom. After booting into Hero, go to the market and download "text edit" -
Then...
go to terminal and:
su
rwsystem
cp /system/bin/user.conf /sdcard/user.conf
Open up text edit, press menu, then "open" and select your sd card and open the user.conf file. and set the en_compcache_CC and backing swap to "0" instad of 1, I can't think of the specific names, but it's obvious. Then set linux-swap to 1, and linux swap swappiness to 80. Save the file.. then
back in terminal,
su
rwsystem
cp /sdcard/user.conf /system/bin/user.conf
and that's it, I don't think you need to reboot the phone, but do it anyways... it'll be laggy for about 20 seconds while the swap builds up, then bam, lightning fast.
Hope this helps.
Click to expand...
Click to collapse
I tried this and I did notice a difference in speed. But it also created a problem with loading screens (which I didn't have before) But This is still good advice as now I can mess with this on my phone. Other people may have better luck with these settings. I've also noticed that what works for one, may not work for someone else
vr24 said:
You wouldn't change swappiness like this in JacHero
If you wish to go with Hero, the instructions on how to format your SD card are right on the first page of JacHero...
If you want a FAAAAST Hero, and I mean FAST... like, 100% usable with no lag hero.... then use 96mb linux swap with 80 swappiness... turn off backing swap and compcache. You'll be blown away at how usable it is.
To do this, format your card as per the instructions, make sure you have 96mb linux swap.... flash the Hero rom. After booting into Hero, go to the market and download "text edit" -
Then...
go to terminal and:
su
rwsystem
cp /system/bin/user.conf /sdcard/user.conf
Open up text edit, press menu, then "open" and select your sd card and open the user.conf file. and set the en_compcache_CC and backing swap to "0" instad of 1, I can't think of the specific names, but it's obvious. Then set linux-swap to 1, and linux swap swappiness to 80. Save the file.. then
back in terminal,
su
rwsystem
cp /sdcard/user.conf /system/bin/user.conf
and that's it, I don't think you need to reboot the phone, but do it anyways... it'll be laggy for about 20 seconds while the swap builds up, then bam, lightning fast.
Hope this helps.
Click to expand...
Click to collapse
Either way will work, only downside to how I explained it was if you reboot you will lose the setting. The OP wanted the simplest way to do it and the way you explained is a bit more complicated although it may be permanent.
How do I verify swappieness? I.e. see what it's set at now.
tsnow247 said:
How do I verify swappieness? I.e. see what it's set at now.
Click to expand...
Click to collapse
su
vi /system/etc/user.conf
That'll open the file and your looking for swappiness
tsnow247 said:
How do I verify swappieness? I.e. see what it's set at now.
Click to expand...
Click to collapse
Assuming you use userinit.sh + user.conf setup, you should be able to do the following:
Code:
adb shell sh /system/sd/userinit.sh -s
in command prompt (the location of userinit.sh script might be different on your ROM).
This will list the status of the compcache module, linux swap, etc. See documentation here.
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
Alright, here's what I've got. CDMA HTC Hero, rooted and running MCR.
I open up A2SD, and it says the card isnt formatted correctly. I set it at about 500mb for the ext3 partition, and it says running VERY briefly, then goes to "finished". Reboot, restart the app, same thing. I've got a 16GB MicroSD.
Whats the deal here? I've looked some stuff up, but cant really get anywhere with this. Any ideas?
PS - I've got a few google voice invites... I *might* be willing to throw one to whoever helps me out here.
Format it back to ext2, ext3 and ext 4 won't even let my phone boot.
Off the top I'd say check how you formatted. I have trouble doing linux partitions on the MAC so I assume you used the hero, and not a pc. You should see the subtraction of the size of the linux partition from the size of the fat32 one. Sorry.
TO get results I would ask at http://android.modaco.com/
BTW no invite.
Kcarpenter said:
Format it back to ext2, ext3 and ext 4 won't even let my phone boot.
Click to expand...
Click to collapse
Tried ext2, still nothing. Even tried adding a swap file, no go there either.
Am I just missing something here?
I used Paragon partition manager to resize the fat32 partition, then used the extra unallocated space to create an ext2. When it still didnt work, I tried resizing the fat32 again and adding a swap partition, and still nothing.
drummingfool said:
Tried ext2, still nothing. Even tried adding a swap file, no go there either.
Am I just missing something here?
Click to expand...
Click to collapse
If you take the card out of the phone and put it in something else, does it show up as a FAT or NTFS file system?
Swap won't do anything for now but take up space on the card.
Could you try the original 2 gig card or any other one? Just as a comparison.
drummingfool said:
I open up A2SD, and it says the card isnt formatted correctly.
Click to expand...
Click to collapse
what do you mean "open up"?
apps2sd is a script. there is nothing to open up. it should run automatically without you noticing anything or you can manually run it from the shell.
did you DL some kind of app?
centran said:
what do you mean "open up"?
apps2sd is a script. there is nothing to open up. it should run automatically without you noticing anything or you can manually run it from the shell.
did you DL some kind of app?
Click to expand...
Click to collapse
I mean when I open up the Apps2SD Program that is in my menu, it still says my card isnt formatted right, and linda file manager says that my space for apps is still only 159MB.
First things first... do you know what adb shell is?
If not then go to the market and get "quick system info"
If apps2sd is working there will be a A2SD Storage section in that program.