drakaz

This user hasn't shared any biographical information


Posts by drakaz

Android : memory thresholds

Memory thresholds, what is it ?

It’s the threshold from which the device will kill some process, to free memory.

On Android, there is two memory threshold : system (/sys/module/lowmemorykiller/parameters/minfree) and dalvik (*_MEM properties).

System thresholds looks at unix free memory.

Dalvik thresholds looks at virtual free memory, in dalvik.

Thresholds

FOREGROUND_APP_MEM : below this threshold, internal task killer will kill foreground applications
VISIBLE_APP_MEM : belowthis threshold, internal task killer will kill second plan applications
SECONDARY_SERVER_MEM : below this thresholds, internal task killer will kill daemon applications
HOME_APP_MEM : below this thresholds, internal task killer will kill the home
HIDDEN_APP_MEM : below this thresholds, internal task killer will kill unvisible applications
CONTENT_PROVIDER_MEM : below this thresholds, internal task killer will kill unvisible content provider
EMPTY_APP_MEM : below this thresholds, internal task killer will kill ghosts application

Exemples

Low FOREGROUND_APP_MEM = kill active application when running internal task killer

High EMPTY_APP_MEM = kill all useless applications

Low HIDDEN_APP_MEM = don’t kill all application in memory = fast to re-open (but use more battery)
High HIDDEN_APP_MEM = kill all applications, nice for battery (but applications remains slow to open)
ect..

Why i haven’t got any FC using a very high threshold on the 3 last parameters ?
A FC happen when a process ask for unavaible ressources. When you kill all application in backgroun, there isn’t any application asking for ressources = no FC.

Conclusion

Very high threshold is useless, they must be set regarding the device ressources.

Very low threshold provide faster reopening, but use a little more battery (not because of used ram, but because some app are running in background).

Remember that those kind of unix device are made for keeping app in memory. Will you kill all the process runing on your laptop to save battery ? The task killer is here to kill useless app, not all. But, if killing all the application preserve some battery…why not. Battery is saved by killing CPU’s consumer, not just freeing memory.

Battery or performances ?

Yesterday, seandk, a french member of frandroid, explain to me that with an application, called autokiller, he was able to significantly increase his battery time.

After a few look at this application, i discovered that autokiller just reconfigure the memory thresholds, at values which device kill a process. For example, in Galaxo, thresholds for HIDDEN_APP_MEM is set to 5120, which mean, when the devices’s memory is below 5120Mb free ram, the device kill all the process which are not visible.

Memory thresholds are already tunned in Galaxo and GAOSP, but in another way : performances. The objective of this tunning is to keep maximum app in memory. It’s nice, but battery killer.

So we have two choice for galaxo 1.6.3 :

  • Keep the memory thresholds settings unchanged in Galaxo, which mean less battery, but more performance, because the device keep maximum app in memory, avoiding loading the application each time its executed
  • Reconfigure thresholds, increasing the values, which mean more battery, but less performances

What is you choice ? Please use the poll on the right to answer !

EDIT :

After a few test with autokiller, the result is that it only change the system settings in /sys/module/lowmemorykiller/parameters/minfree (kernel settings). Autokiller  can’t change dalvik settings (getprop *MEM) because they are fixed by init.lo

So, be carrefull ! Maximum free memory is around 6Mo…

So, confirmed, the poll is for dalvik settings !

Neocore_714Mhz

Overclocking Samsung Galaxy, patch done !

Kernel patch, providing a little overclocking for our lovely device, is done. The best frequency, after a lot of tests, is 710Mhz.

What does it mean for our usage ? Nice score in benchmark, and a better experience using this device. Now, a little benchmark results :

Galaxo 1.6.3 @528Mhz :

  • Linpack=2,29s
  • Neocore= max 30.6 fps

Galaxo 1.6.3 @614Mhz @710Mhz:

  • Linpack=1.72s
  • Neocore= max 34 fps, medium : 33,5 fps

Neocore_714Mhz

The patch will be released soon on my github.

Update : frenquencies tables and screenshot

19200 120000 122880 176000 245760 320000 352000 480000 528000 547200 566400 585600 614000 633200 652400 671600 690800 710000