memory tweak 1: 356MB visible 258MB free

just performed some tests with different reserved mem sizes (stock kernel ZSJP8) for your ref

default settings:
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM=16384
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_GPU1=10240
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_ADSP=1500
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC0=14336
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC2=12288
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC0=36864
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC1=36864
CONFIG_VIDEO_SAMSUNG_MEMSIZE_JPEG=5012
CONFIG_VIDEO_SAMSUNG_MEMSIZE_TEXSTREAM=10240



1/. minimum (almost) reserved mem with movie playback possible (no lag in youtube), 356mb memory, no special lags observed, opened 4 tabs in browser with lots of imgs and swfs



CONFIG_ANDROID_PMEM_MEMSIZE_PMEM=8192
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_GPU1=4096
CONFIG_ANDROID_PMEM_MEMSIZE_PMEM_ADSP=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC0=6144
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC2=6144
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC0=29696**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC1=29696**##
CONFIG_VIDEO_SAMSUNG_MEMSIZE_JPEG=3072
CONFIG_VIDEO_SAMSUNG_MEMSIZE_TEXSTREAM=2048

** min value in order to play movies = 29mb, 28mb wont play
## can be set to a lower value without movie playback, setting these with too low values caused problems, below 20mb should be ok


2/. nearly double all default values, 219mb available, didnt feel faster




as to min mem usage, u'll need to (in brief):
1/. remove unneccessary apps
2/. remove startup/network chg broadcast listeners from the app - a lot of apps/services are launched at startup up or network state chg, remove them so they wont start automatically, eg gtalk, sync/feed, vold service, installd, etc
3/. kill unneccessary services & processes - i didnt use any killer since i rooted my phone, i use script to kill them since killers consume more mem
4/. i have read the source and found that only -Xmx (max mem) is included but no -Xms (initial mem), perhaps we can do something here (not done yet)


test2: available memory - 257.68mb




reference for 2.1
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC0=10240
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC1=1024
CONFIG_VIDEO_SAMSUNG_MEMSIZE_FIMC2=10240
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC0=24576
CONFIG_VIDEO_SAMSUNG_MEMSIZE_MFC1=24576
CONFIG_VIDEO_SAMSUNG_MEMSIZE_TEXSTREAM=8192


more info

performance for different file systems and slice_sync in Froyo

performed some tests days before and I would like to share the results with all of you. the result was as expected (my expectation)

the test was conducted on /dbdata, using dd to read and write, and with different slice_sync and slice_async values.
According to lwn.net:
- slice_sync: How many msec a sync disk slice lasts
- slice_async: How many msec an async disk slice lasts

in froyo, the default value for slice_sync is 97, and slice_async is 39. while in eclair, they are 100 and 40 respectively.

and, the results were obtained by the average value under different file systems as below:
write: dd if=/dev/zero of=/dbdata/test count=25000 (using default bs=512)
read: dd if=/dbdata/test of=/dev/null

test1: default slice_sync (97), slice_async (39)
ext2 w=0.3563576, r=0.2172932
ext4 w=1.7057048, r=0.1286368
ext2 on ext4 w=0.2786272, r=0.1360666
ext2 on ext4 noatime nodiratime w=0.279215, r=0.124138
ext4 on ext2 w=0.4299866, r=0.1277804

test2: slice_sync (50), slice_async (20)
ext2 w=0.3883144,r=0.2209398
ext4 - omitted
ext2 on ext4 w=0.2743988,r=0.1343098
ext4 on ext2 w=0.4350612,r=0.2513572

test3: slice_sync (500), slice_async (200)
ext2 w=0.4159796, r=0.40419
ext4 - omitted
ext2 on ext4 - omitted
ext4 on ext2 w=0.4252074, r=0.2614818

obviously, the fastest one was ext2 on top of ext4, with only insignificant impact with noatime and nodiratime options (i cant believe it). this combination of file systems performed well as expected since while ext2 do somewhat like "blind read/write", the ext4 will hold the data b4 commit (PLS, pls dont argue ext2 and ext4 with me and that's why i described them very roughly... )


actually this was just for my own leasure but i think it may be useful to u guys as well so i decided to post it here for your ref


more info