[G1 Android Development] brotbuexe:
just for sharing.

After some time with compcache and 32mb backing swap, and then some time with 128mb linux swap, I found 64mb linux swap with swappiness 50 is working best for me (cyanogen 4.1.9* on the 192mb ram htc magic 32b model).

I have 150 apps installed and using 4-5 widgets and 10 app organizer shortcuts on the home screen, when I switch back to home screen it will be reloaded one of ten times and then it uses 2-3 seconds.

my user.conf:

# User.conf by miketaylor00
# General parameters
general{
apps2sd=0	# this is useless here, require a modified a2sd script
media2sd=1	# moves the medias to sd if /system/sd/media exists
}

#compcache related parameters
compcache{
compcache_en=0	# enable(1) or disable(0) compcache
cc_disksize=60	# Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=48	# Limite the memory usage when backing swap is used
cc_backingswap_en=0	# enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p3 # pointing to the backingswap partition device
cc_swappiness=30 # default 60
}

#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1	# enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p3 # swap partition device
swappiness=50 # default 60
}

#virtual memory
sys_vm{
sys_vm_en=1	#enable(1) or disable(0) virtual memory configurations
page_cluster=3	# default 0
laptop_mode=0	# default 0
dirty_expire_centisecs=3000	# default 3000
dirty_writeback_centisecs=500	# default 500
dirty_background_ratio=5	# default 5
dirty_ratio=10	# default 10
}

#cpu clock
proc_cpu{
proc_cpu_en=1	#enable(1) or disable(0) user cpu configurations
# freqency options
# 19200
# 122880
# 128000
# 245760
# 384000
# 528000
scaling_min_freq=192000	# default 245760
scaling_max_freq=528000	# default 528000
sampling_rate=2000000	#default 200000 depending on kernel version
powersave_bias=0	# default 0, CM3.9.6 default uses 200
up_threshold=45	# default 40, percent cpu usage before going up a speed step
}

userinit.sh -i (10 min after boot, no use):

/system/sd/userinit.sh -i
=== user.conf ===
*** general ***
apps2sd=0
media2sd=1

*** CompCache ***
compcache_en=0
cc_memlimit=48
cc_disksize=60
cc_backingswap_en=0
cc_backingswap=/dev/block/mmcblk0p3
swappiness=50

*** Swap File ***
swap_file_en=0
linux_swap_file_size=32
linux_swap_file=/sdcard/swap.file

*** Linux Swap ***
linux_swap_en=1
linux_swap_partition=/dev/block/mmcblk0p3

*** VM ***
sys_vm_en=1
page_cluster=3
laptop_mode=0
dirty_expire_centisecs=3000
dirty_writeback_centisecs=500
dirty_background_ratio=5
dirty_ratio=10

*** CPU ***
proc_cpu_en=1
scaling_min_freq=192000
scaling_max_freq=528000
sampling_rate=2000000
powersave_bias=0
up_threshold=45

=== free ===
total used free shared buffers
Mem: 98020 95948 2072 0 704
Swap: 64252 35576 28676
Total: 162272 131524 30748

=== swaps ===
Filename Type Size Used Priority

/dev/block/mmcblk0p3 partition 64252 35576 -1

=== rzscontrol /dev/block/ramzswap0 -s ===
Failed to open /dev/block/ramzswap0: No such file or directory

=== meminfo ===
MemTotal: 98020 kB
MemFree: 1972 kB
Buffers: 704 kB
Cached: 13248 kB
SwapCached: 12176 kB
Active: 36056 kB
Inactive: 39636 kB
Active(anon): 30952 kB
Inactive(anon): 31100 kB
Active(file): 5104 kB
Inactive(file): 8536 kB
Unevictable: 268 kB
Mlocked: 0 kB
SwapTotal: 64252 kB
SwapFree: 28676 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 57612 kB
Mapped: 8316 kB
Slab: 7356 kB
SReclaimable: 1608 kB
SUnreclaim: 5748 kB
PageTables: 7456 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 113260 kB
Committed_AS: 2183492 kB
VmallocTotal: 155648 kB
VmallocUsed: 79032 kB
VmallocChunk: 11260 kB

=== VM configurations ===
sysctl: error reading key 'net.ipv4.route.flush': Permission denied
vm.overcommit_memory = 1
vm.panic_on_oom = 0
vm.oom_kill_allocating_task = 0
vm.oom_dump_tasks = 0
vm.overcommit_ratio = 50
vm.page-cluster = 3
vm.dirty_background_ratio = 5
vm.dirty_background_bytes = 0
vm.dirty_ratio = 10
vm.dirty_bytes = 0
vm.dirty_writeback_centisecs = 500
vm.dirty_expire_centisecs = 3000
vm.nr_pdflush_threads = 2
vm.swappiness = 50
vm.lowmem_reserve_ratio = 32
vm.drop_caches = 0
vm.min_free_kbytes = 1281
vm.min_free_order_shift = 4
vm.percpu_pagelist_fraction = 0
vm.max_map_count = 65536
vm.laptop_mode = 0
vm.block_dump = 0
vm.vfs_cache_pressure = 100
vm.mmap_min_addr = 32768

=== CPU Configuratons ===
up_threshold: 45
sampling_rate: 2000000
powersave_bias: 0
scaling_cur_freq: 528000

=== cpu stats ===
time_in_state:
19200 0
122880 0
128000 0
245760 92808
384000 4600
528000 60169

trans_table:
From : To
: 19200 122880 128000 245760 384000 528000
19200: 0 0 0 0 0 0
122880: 0 0 0 0 0 0
128000: 0 0 0 0 0 0
245760: 0 0 0 0 0 21
384000: 0 0 0 9 0 5
528000: 0 0 0 11 14 0
#