The phone (Jiayu G4S) is running Android 4.4.2, 2GB of ram, stock jiayu.es rom (kernel 3.4.67)
Stock configuration also sets up some swap in zram, I disabled it, does not seem to make a difference.
Task manager shows at any time at least 0.92GB free or more. It shows at most 12-13 cached inactive apps that are still in ram, a bit more if process limit is manually set to a high value (just for kicks I choose 100).
dumpsys meminfo, this is how it looks now:
Total RAM: 2016644 kB Free RAM: 883420 kB (230000 cached pss + 131652 cached + 521768 free) Used RAM: 852001 kB (805401 used pss + 1684 buffers + 8972 shmem + 35944 slab) Lost RAM: 281223 kB ZRAM: 4 kB physical used for 0 kB in swap (0 kB total swap) Tuning: 256 (large 512), oom 122880 kB, restore limit 40960 kB (high-end-gfx)
And yet, frequently used applications get periodically thrown out from memory (shown in task manager with 0.00b allocated), which results in a small delay at next launch.
oomkiller parameters seem sane
shell@G4:/ $ cat /sys/module/lowmemorykiller/parameters/minfree 12288,15360,18432,21504,24576,30720
Why are frequently used programs kicked out, despite all that free memory? Is there anything I can configure (I have root access)?