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.
Related
ok so i didnt really know what swap was or compcache with backing was so i spent the day lookin it up and i just want to know if what im getting out of my info is correct.
swap, basically instead of your phone just seeing ram it also sees your swap partition as part of the ram. so it stores app data and etc. to the swap partition thus making your phone run faster and not taking up all your internal ram and make it run slower. and it is managed by linux. by changing your swappiness setting either higher or lower will change how often swap is used.
compcache, basically creates a sort of swap partition inside the ram itself. it compresses what it swaps into this partition to create more space in the ram. im guessing people like this with backing swap because the compressed info can be brought up quicker because its compressed in the phones ram rather than like swap were its on the sd.
backing swap, when compcache is full it uses the swap partition on my sd. but rather than being like linux swap were its controlled by linux, backing swap is managed by compcahe wich works together better than compcache and linux swap.
im a complete noob here lol so if i got something wrong you gotta explain it to me in laymans terms thanx for the help
Yes, that's right. Did you copy and paste those definitions lol?
lol no i did a lot of google searching its all other peoples info but i put it into words that i can understand.lol
Amack that almost deserve a sticky
this post help me understand the way the partition works alittle better now, thanks!
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.
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...
Hello there,
two days ago i flashed teamhacksung's ICS aka CM9.
Firstday: everything smooth and okay
Second day: launcher starts to FC here and there, in the cm9 thread i found this "guide" (to bad that i just copied it to an txt and didnt copied the link...)
Code:
1. download Rom Toolbox from market, install, open
2.change to performance tab
3.build.prop tweaks
4.VM heap size to 48 mb
5. program will ask to reboot do it, go to toolbox again and choose Auto Memory Manager
6.choose presets->default
7.reboot and/or wipe cache
i downloaded Rom Toolbox and checked heapsize, currently its 128MB. So my question, is step 4 meaning to increase heap size from somthing default (<48mb) to 48mb or is it meant to decrease from current 128 to 48 mb? if i'm not remembering wrong, i had to increase heap for my tomcat server after having problems. so, (if its meant to) why decrease heap in android from 128 to 48? a short explanation would be cool.
I hope someone can help me with the heapsize question, i dont really want to make it even worse
Thanks in advance
Maybe will help u:
VM Heap Size
The heap is an area of dynamic memory allocated to programs. With a larger heap size, there is more memory for the program and the garbage collector can run more efficiently. Therefore, it is possible to get better performance by setting a larger VM heap size.
However, if you set it too high, you can run out of free memory which can trigger swapping which will degrade performance. Therefore the VM setting is a trade-off.
The optimal value will depend on the RAM on the device as well as the programs and usage patterns, therefore the optimal setting can often only be determined by the user experimentally.
Default value: varies between devices
Click to expand...
Click to collapse
source: droidgram[dot]com
It should be noted that in the ICS builds the build.prop now contains 3 variables pertaining to the heap size:
Code:
dalvik.vm.heapgrowthlimit
dalvik.vm.heapsize
dalvik.vm.heapstartsize
With the size in the tweaker referring to dalvik.vm.heapsize, the other two are new.
I have no clue as to what any of this means but I thought I should mention it.
Thanks for this informations, i'll try a lower value than 128
dodgex said:
Thanks for this informations, i'll try a lower value than 128
Click to expand...
Click to collapse
+ this Archive will help u :
http://forum.xda-developers.com/archive/index.php/t-1025915.html
damn...
it was way smoother (at least what i saw until now)...
but at least mp3 player (default music app) does not start...
first i set to 64m but as i saw that mp3 didnt work i thougt, maybe to less... i increased to 96 but here was mp3 also not working, after setting back to 128, still not working mp3...
as in the guide, i always cleared cache after changing value.
someone got an idea? do i have to reflash cm9?