OK so i have v3r2 with 96 mb linux swap and it worked fine in the beginning...but now its straight up slow and i need all my widgets so...by default i have 30 swappiness and i heard in a thread that having 60 swappiness helps...I dont know anything about adb (dont have that much time,) so i just need to know how to change the swappiness setting...preferably if i can do it in console or terminal emulator
I use Swapper personally, but im on JF 1.51. I heard 60 was the sweet spot on Cyan roms by default for swappiness. Then using a 32mb linux-swap partition (and thus 32mb) for swap.
Otherwise if your not on Cyans and are like I am on JF. The ideal setting that works well is 32 swap (using the partition) and 10 swappiness.
More then that just asks for trouble. compcache I wouldnt use personally either btw, its slower then a linux-swap setup it seems.
Related
Run sh /system/bin/swap -s to check swap status and other mod values.
Ok so I did this to check on my stuff, cause i wanted to make a compcache.
*** CompCache ***
compcache_en=0
cc_memlimit=16
cc_disksize=32
cc_backingswap_en=0
cc_backingswap=/dev/block/mmcblk0p3
swappiness=30
*** Linux Swap ***
linux_swap_en=1
linux_swap_partition=/dev/block/mmcblk0p3
....................
=== Linux Swap status ===
Linux SWAP enabled on /dev/block/mmcblk0p3
Linux Swap: swappiness - 30(system) 30(user)
i'm running JACxHEROSkiv1.5r2 and want to know what I can do to inprove the speed of the ROM.
Any suggestions are welcome i'm not much of a programmer
Looks nlike you need to edit the"cc_disksize=32" value, but I doubt that affect the speed tbh.
What size swap partition are you running?
Im running with 96 MB linux swap
btw what is that (cc_disksize=32) ?? the linux swap size ?
I read i a couple of posts about the linux swap and compcache and read that if you enable comcache it could speed up your device slightly.
YuYe said:
Im running with 96 MB linux swap
btw what is that (cc_disksize=32) ?? the linux swap size ?
I read i a couple of posts about the linux swap and compcache and read that if you enable comcache it could speed up your device slightly.
Click to expand...
Click to collapse
Ah thought CC was already enabled.
compcache_en=0 < This needs to be changed to one to enable CC.
cc_disksize=32 < That's the CC size, I wouldnt change it.
I would *strongly* recommend reducing your swap size. It seems to be that the bigger the size, the faster it is at first, but then the phone starts to get really slow. Go for 48 or 64mb.
I don't really know a lot about CC, I've never edited the config files for it as it's generally set up for optimum performance already (and I also don't like the idea of it wearing out the nand). If you look in the xHero there are other configurations for CC, CC+swap, swap, CC +backing swap that you may want to look at.
twistedUmbrella said:
Alright. Ran a 96 mb swap all day to test. Load screen about equal. It was "ghost lag" where you do something and it freezes for a minute
Click to expand...
Click to collapse
Ok then i better change the size of my swap. also does it matter if your on ext3 or 4 ?
And what is the difference between linuxswap and compcache ?
Sorry for these noob questions but I'm a bit lost
YuYe said:
Ok then i better change the size of my swap. also does it matter if your on ext3 or 4 ?
And what is the difference between linuxswap and compcache ?
Sorry for these noob questions but I'm a bit lost
Click to expand...
Click to collapse
no ext doesn't matter.
Compressing pages and keeping them in RAM virtually increases its capacity. This allows more applications to fit in given amount of memory.
Click to expand...
Click to collapse
The problem is the Hero UI is quite CPU intensive, so less CPU power can be devoted to compressing/decompressing files in RAM.
Linux-swap is a separate partition where files are paged, increasing the amount of memory. The difference being it's outside the RAM.
I've been searching and haven't really found a definitive thread or answer...
I'm using CM 4.1.999 currently (4.0.4 previously) with linux-swap exclusively, and have tried other ROMs as well.
Right now I have an 8gb class 6 SD with 4 partitions: FAT32 remainder, 500MB ext3, ~40MB linux-swap, and ~200MB linux-swap. I created the two swap partitions as several of the threads I've read adamantly state not to go above 32MB (without explanation), but others also adamantly state to use about 200MB for Hero ROMs.
So, my question is, which is it, and why? Why the 32MB limit? Why not 196MB? Why the disparity between "basic" ROM recommendations and Hero ROM recommendations? Besides "it goes slower", is there an answer to why specifically it causes it to perform slower with certain ROM types, and is there a way to mitigate it?
Also, regarding swappiness, how do we calibrate it? What does swappiness mean? I've seen that in user.conf the default is 60, but I've seen some people use 32MB swap partitions with 40 swappiness, or 200MB with 100 swappiness, as well as 96MB with 80 swappiness. So, which is it, and how do we know what is right for us besides countless iterations of setting, rebooting, testing, setting, rebooting, testing, etc..?
If I missed a link or thread somewhere with the information I'm looking for, please let me know so I can do my research ; ) A simple explanation or recommendation would be key, though... just trying to learn as much as I can!
Thanks! As a long-time XDA user, I still appreciate the community involvement and innovation that happens here!!
I have never seen ANYWHERE where it asks for 200mb swap partitions. having two swap partitions does absolutely nothing for you.
the 32mb limits were imposed due to stability. However, you should use 64 or 96mb for hero roms.
anything more may cause unnecessary instability
Swappiness just refers to how often the phone will write to the swap file (the tendency for the ROM to place data on the swap) the higher the number, the more likely data will be sent to the swap partition. anywhere from 30-80 is ok.
If youd like to learn more about good swap settings, go to the user.conf threads in the dev section where they discuss performance benefits/hits from different configurations
Excellent, thanks!
I've looked at the user.conf thread and seen several recommendations, but had not seen a single definitive "these are the best agreed-upon settings"..
I'd think that since the hardware is the same, we should be able to say, "With SPL x and ROM y on Device z, these settings are ideal" -- but I haven't seen that.
I kept two swap partitions in case I switched to a Hero ROM in the future so I wouldn't have to repartition again..
Are there major stability issues if I were to use a 64 or 96MB swap with a non-Hero ROM? I don't understand why it's OK with Hero, but not with others... why the disparity?
grivad said:
Excellent, thanks!
I've looked at the user.conf thread and seen several recommendations, but had not seen a single definitive "these are the best agreed-upon settings"..
I'd think that since the hardware is the same, we should be able to say, "With SPL x and ROM y on Device z, these settings are ideal" -- but I haven't seen that.
I kept two swap partitions in case I switched to a Hero ROM in the future so I wouldn't have to repartition again..
Are there major stability issues if I were to use a 64 or 96MB swap with a non-Hero ROM? I don't understand why it's OK with Hero, but not with others... why the disparity?
Click to expand...
Click to collapse
I dont like repartitioning either haha but i use 96mb on cyan's rom (i switch between hero and cyan) I havent had any issues with them
the 32mb limit was more or less an experimental guess made quite a while ago. it seems dated.
make sure you only have 1 swap partition. that could potentially cause problems
So you should be fine with 64-96mb
the reason there is no definitive setting that maximizes performance is due to differences in ROM's. What works on one rom may not work so well in another. Also, many people perceive the speed of their settings differently and suggest what they believe to be fast.
The best way to find what works best for you is to experiment with different settings and see what matches your needs
Thanks for the info!
Per your comments, I repartitioned with one swap partition set at 96MB..
Previously I had a 32MB partition with swappiness at 30 and it ran lickety split. Now that I've gone to 96MB, I increased swappiness to 60 and I'm seeing some weird performance issues..
Do you have a recommendation for the swappiness value for a 96MB swap partition?
Im new to all this swapping stuff etc. so sorry if this is a stupid question. When i type the free command I see that my phone memory is also almsot used up with like 1000-3000k being frees and my swap memory only being half way used (i set it to 64 mb) is there a way i can make the swap be the primary source of memory?
Hope that made sense, Thanks in advance!
No, you can't set virtual memory to have the priority. If you have a user.conf and userinit.sh you can change the swappiness value, which I'm assuming would mean more virtual memory is utilized.
Hola
I don't have any other Androids around me so I never felt that my G1 is actually pretty slow compared to the hero I had a fiddle with yesterday (animation speed and felt response time of programs).
Is there anything wrong with my configuration? (I'm using a stock CM 3.7.1 with swapper, no swap partition though)
I'm a frequent reader here but it is hard to keep track of all the tweaks and tricks some people do... so here my question in a nutshell: Can a G1 be as fast as a hero?
Yes there are a couple of things u can do
1. Apps2sd
2. Swap partition with swapper
3. Compcache
4. Zipaline
5. 10mb Hack (adds 10 mb to internal memory)
Thats all i can think of right now
Sorry for posting another question relating to this.. I'm having a heck of a time trying to wrap me head around...
ROM: Cyanogen 4.2.10.1
I have a 4GB class 6 SD card in my phone partitioned (rounded):
3300MB fat32
500MB ext3
200MB swap
I'm have the userinit.sh in /system/sd as
Code:
#!/system/bin/bash
#
partition=3 #partition number of swap partition. Change if swap is not partition 3.
mem_limit_kb=14688 #default 14688 (15%). Range 0 - [size of swap partition], larger number = less 'normal' RAM, more 'swap' RAM
swappy=30 #swappiness. larger number = more likely to swap, smaller number = less likely to swap
modprobe ramzswap;
rzscontrol /dev/block/ramzswap0 --backing_swap=/dev/block/mmcblk0p$partition --memlimit_kb=$mem_limit --init;
swapon /dev/block/ramzswap0;
sysctl -w vm.swappiness=$swappy;
exit 0;
as per the Cyanogen wiki...
If I run "free" from the terminal I get
Code:
free
total used free shared buffers
Mem: 97924 96448 1476 0 2940
Swap: 24472 12940 11532
Total: 122396 109388 13008
What I'm having trouble understanding is "mem_limit_kb=14688". What memory is it referring to? The built in RAM?
If so, does that mean to put active programs into the remaning 80MB of RAM and store the "images/pages" of inactive applications into the 14688KB of reserved RAM for Compcache? After the 14688KB of Compcache is filled, should it not then dump everything to the Swap?
The reason I'm confused is that I have 200MB of swap partition, and yet I still load up the browser from memory and it reloads pages... Or is it reloading the page, just this time from a local cache (which would be silly)?
Finally, what exactly does "swappiness. larger number = more likely to swap, smaller number = less likely to swap" actually mean? I don't really understand that at all...
Its not a good idea having both enabled in the user.conf..One will be set as back swap while the other is be set to 1.
To be honest I have no idea.. heh. I just copied it from the Wiki.. To me it made a bit of sense running both... Compache to be first since it should be a bit faster than swap... Atleast that's how I saw it...