• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

Compcache userinit.sh tutorial for Cyanogen 367

Search This thread

huanyu

Senior Member
Apr 26, 2009
125
14
Yes the script has a little issue. I am debugging it now. I will post the fix soon as am done testing...

edit: Fixed/update
-Resolved Linux-swap not turning on
-VM configuration works with Linux-swap
-Compcache works with any kernel version
-Ensure backing_swap is not always the default

Added:
-Minimum CPU scaling frequency
-CPU sampling rate (You should not touch this unless you know why it was added and what it means)
-Power bias

The fix/update is now posted. I take no credit for this script.

adb push userinit.sh /system/sd
adb push user.conf /system/sd

user.conf usage

To use only linux-swap
-set compcache=0
-set linux_swap_eanable=1

To use only compcache without backing_swap
-set compcache=1
-set linux_swap_eanable=0
-set cc_disksize=32 (32*1024 = 32768kb = 32MB)
-set cc_memlimit=0

To use compcache with backing_swap
-set compcache=1
-set linux_swap_eanable=0
-set cc_disksize=0 (doesn't really matter so long cc_memlimit != 0)
-set cc_memlimit=8 (doesn't matter the number used, it will default to 15% of total RAM--known issue)



These are default system settings:

page-cluster=3
laptop_mode=0
dirty_expire_centisecs=3000
dirty_writeback_centisecs=500
dirty_background_ratio=5
dirty_ratio=10
swappiness=60

sampling_rate=2000000 (200000 depending on kernel version)
scaling_min_freq=245760
powersave_bias=0

I have updated the script and start a new post http://forum.xda-developers.com/showthread.php?p=4240913#post4240913

if there are anything you guys wanna to add.. just le me know. I am happy to do it.