Hahaha it's ok. I made these changes yesterday and reboot. I'm not feeling anything good or bad.
So.. I'm reading different stories. Some say use dha, some say use fha. Some say it doesn't work, some say it work. Can anyone clear this up for me?
Sent from my SM-G920F using Tapatalk
this thread is 245 posts.... i bet you 75% of those are actually on topic.... of which there is a good 50/50 split between fha and dha... 80% of those have peoples configurations.
use the damn search and open your eyes.
Code:ro.config.fha_enable=true ro.sys.fw.use_trim_settings=true ro.sys.fw.empty_app_percent=50 ro.sys.fw.trim_empty_percent=100 ro.sys.fw.trim_cache_percent=100 ro.sys.fw.bservice_enable=true ro.sys.fw.bservice_limit=5 ro.sys.fw.bservice_age=5000 ro.sys.fw.trim_enable_memory=128000000
As many of you may or may not have seen, there has finally been some progress made regarding S6 memory management issues. There is a long winded thread HERE with lots of reports of bootloops, lots of the same question being asked over, and over. I just wanted to share what I found, get more knowledgeable eyes on it, and hopefully get this memory issue ironed out.
Code:Here is most of what I found regarding DHA: ProcessList.smali ro.config.dha_cached_max=6 ro.config.dha_cached_min=2 ro.config.dha_empty_init=30 ro.config.dha_empty_min=6 ro.config.dha_empty_max=30 ro.config.oomminfree_high=73728,92160,110592,129024,147456,184320 ro.config.ldha_es_enable=false ro.config.ldha_spc_enable=true sys.config.s_dha_margin ro.config.64bit_lmk_enable=false ro.config.dha_ils_enable=true ro.config.dha_ils_dyna_lmk=false ro.config.dha_ils_rate=1.5 sys.config.s_dha_bg_max ro.config.dha_ils_sdha_rate=1.8 ro.config.dha_whitelist_enable=2 ro.config.dha_goldenlist_enable=0 ro.config.dha_HEC_enable=0 ro.config.dha_frag_enable=0 ro.config.dha_lmk_scale=-1 ro.config.dha_lmk_rate=1 ro.config.dha_dyna_lmk_enable=false ro.config.sdha_margin_min_low=20 ro.config.sdha_margin_min_high=60 ro.config.sdha_apps_bg_max=40 ro.config.sdha_apps_bg_min=4 ro.config.dha_step ro.config.dha_th_rate ro.config.dha_th_level=15 ro.config.dha_defend_th_level=3 ro.config.dha_increase_th ro.config.dha_ils_dynamic_lmk_flag ro.config.dha_whl_key ActivityManagerService.smali ro.config.dha_whl_key=255 ro.config.dha_gdl_key=63
Here is what I recommend:
For stabilty, a slight improvement over stock:
Code:#DHA ro.config.dha_cached_max=9 ro.config.dha_lmk_scale=1.5 ro.config.sdha_apps_bg_max=50
This should be stable with multi tasking improved over stock
Code:#DHA ro.config.dha_cached_max=12 ro.config.dha_empty_max=32 ro.config.dha_empty_init=32 ro.config.dha_lmk_scale=0.990 ro.config.sdha_apps_bg_max=60
This will multi task very well, stability over time is doubtful...
Code:#DHA ro.config.dha_cached_max=20 ro.config.dha_empty_max=36 ro.config.dha_empty_init=36 ro.config.dha_lmk_scale=0.545 ro.config.sdha_apps_bg_max=70
And, for those of you that want to have every app on your phone open...
Code:#DHA ro.config.dha_cached_max=20 ro.config.dha_empty_max=42 ro.config.dha_empty_init=42 ro.config.dha_lmk_scale=0.272 ro.config.sdha_apps_bg_max=90
this tweaks affect battery?These ones are geared towards multi tasking. They do a very good job. I can't guarantee stability over time.
#DHA
ro.config.dha_cached_max=20
ro.config.dha_empty_max=36
ro.config.dha_empty_init=36
ro.config.dha_th_rate=0.75
ro.config.dha_lmk_scale=0.272
ro.config.sdha_apps_bg_max=90
Do you know Why I cannot change ooem lmk ? I tried to changed the 6 state of memory and when I wanted to apply it return to the stock values![]()
After way to many hours of testing and messing with this stuff, here is what I know.
ro.config.dha_cached_max=20 <~~~ This line is pretty obvious in what it does. This is the limit for cached apps/services
ro.config.dha_empty_max=36 <~~~ Same here, this is the limit of empty apps/services (Do some research on LMK if you don't know what this means)
ro.config.dha_empty_init=36 <~~~ I'm not sure what this line does exactly but the value here corresponds the the empty_max value
ro.config.dha_th_rate=0.75 <~~~ I'm not entirely sure what this line does yet, it may not even be needed
ro.config.dha_lmk_scale=0.272 <~~~ This is the line that sets the LMK values. These override anything set in the ROM or kernel. This is probably the most important line that I actually understand
ro.config.sdha_apps_bg_max=90 <~~~ This line sets the total overall background apps/processes allowed
Here are what I've found the lmk_scale values to represent:
0.272 = 18, 25, 31, 40, 46, 55
0.545 = 29, 38, 46, 56, 65, 79
0.767 = 38, 48, 58, 70, 80, 99
0.990 = 47, 59, 71, 83, 95, 119
1.2 = 56, 69, 83, 96, 109, 137
1.5 = 68, 84, 100, 114, 130, 164
It's been my understanding that with arm64 devices with 2+ GB RAM, the LMK values are set lower as mostly a fail safe, and we let the cached, empty, and bg limits do the work. That is where the issues we are having with instability over time come in. Finding the best values for each property has proven to be difficult to say the least. Anyway, I just wanted to share what I know. Now we're all on the same page.
Here is most of what I found regarding DHA:
ProcessList.smali
ro.config.dha_cached_max=6
ro.config.dha_cached_min=2
ro.config.dha_empty_init=30
ro.config.dha_empty_min=6
ro.config.dha_empty_max=30
ro.config.oomminfree_high=73728,92160,110592,129024,147456,184320
ro.config.ldha_es_enable=false
ro.config.ldha_spc_enable=true
sys.config.s_dha_margin
ro.config.64bit_lmk_enable=false
ro.config.dha_ils_enable=true
ro.config.dha_ils_dyna_lmk=false
ro.config.dha_ils_rate=1.5
sys.config.s_dha_bg_max
ro.config.dha_ils_sdha_rate=1.8
ro.config.dha_whitelist_enable=2
ro.config.dha_goldenlist_enable=0
ro.config.dha_HEC_enable=0
ro.config.dha_frag_enable=0
ro.config.dha_lmk_scale=-1
ro.config.dha_lmk_rate=1
ro.config.dha_dyna_lmk_enable=false
ro.config.sdha_margin_min_low=20
ro.config.sdha_margin_min_high=60
ro.config.sdha_apps_bg_max=40
ro.config.sdha_apps_bg_min=4
ro.config.dha_step
ro.config.dha_th_rate
ro.config.dha_th_level=15
ro.config.dha_defend_th_level=3
ro.config.dha_increase_th
ro.config.dha_ils_dynamic_lmk_flag
ro.config.dha_whl_key
ActivityManagerService.smali
ro.config.dha_whl_key=255
ro.config.dha_gdl_key=63
#DHA
ro.config.dha_cached_max=9
ro.config.dha_lmk_scale=1.5
ro.config.sdha_apps_bg_max=50
#DHA
ro.config.dha_cached_max=12
ro.config.dha_empty_max=32
ro.config.dha_empty_init=32
ro.config.dha_lmk_scale=0.990
ro.config.sdha_apps_bg_max=60
#DHA
ro.config.dha_cached_max=20
ro.config.dha_empty_max=36
ro.config.dha_empty_init=36
ro.config.dha_lmk_scale=0.545
ro.config.sdha_apps_bg_max=70
#DHA
ro.config.dha_cached_max=20
ro.config.dha_empty_max=42
ro.config.dha_empty_init=42
ro.config.dha_lmk_scale=0.272
ro.config.sdha_apps_bg_max=90
#DHA
ro.config.dha_cached_max=15
ro.config.dha_cached_min=4
ro.config.dha_empty_max=36
ro.config.dha_empty_min=9
ro.config.dha_empty_init=36
ro.config.dha_lmk_scale=0.545
ro.config.dha_update_max_count=5
ro.config.dha_step=2
ro.config.dha_th_rate=1.4
ro.config.dha_defend_th_level=0
ro.config.64bit_lmk_enable=true
ro.config.sdha_apps_bg_max=70
ro.config.sdha_apps_bg_min=8
ro.config.dha_ils_enable=true
ro.config.dha_ils_dyna_lmk=true
ro.config.dha_ils_rate=1.5
After way to many hours of testing and messing with this stuff, here is what I know.
ro.config.dha_cached_max=20 <~~~ This line is pretty obvious in what it does. This is the limit for cached apps/services
ro.config.dha_empty_max=36 <~~~ Same here, this is the limit of empty apps/services (Do some research on LMK if you don't know what this means)
ro.config.dha_empty_init=36 <~~~ I'm not sure what this line does exactly but the value here corresponds the the empty_max value
ro.config.dha_th_rate=0.75 <~~~ I'm not entirely sure what this line does yet, it may not even be needed
ro.config.dha_lmk_scale=0.272 <~~~ This is the line that sets the LMK values. These override anything set in the ROM or kernel. This is probably the most important line that I actually understand
ro.config.sdha_apps_bg_max=90 <~~~ This line sets the total overall background apps/processes allowed
Here are what I've found the lmk_scale values to represent:
0.272 = 18, 25, 31, 40, 46, 55
0.545 = 29, 38, 46, 56, 65, 79
0.767 = 38, 48, 58, 70, 80, 99
0.990 = 47, 59, 71, 83, 95, 119
1.2 = 56, 69, 83, 96, 109, 137
1.5 = 68, 84, 100, 114, 130, 164
These values are in MB
It's been my understanding that with arm64 devices with 2+ GB RAM, the LMK values are set lower as mostly a fail safe, and we let the cached, empty, and bg limits do the work. That is where the issues we are having with instability over time come in. Finding the best values for each property has proven to be difficult to say the least. Anyway, I just wanted to share what I know. Now we're all on the same page.
ro.config.dha_cached_max=15
ro.config.dha_cached_min=4
ro.config.dha_empty_max=36
ro.config.dha_empty_min=9
ro.config.dha_empty_init=36
ro.config.dha_lmk_scale=0.990
ro.config.dha_th_rate=1.83
ro.config.sdha_apps_bg_max=70
ro.config.sdha_apps_bg_min=8
ro.config.dha_ils_enable=true
ro.config.dha_ils_dyna_lmk=true
ro.config.dha_ils_rate=1.5
#FHA
ro.config.fha_enable=true
ro.sys.fw.use_trim_settings=true
ro.sys.fw.empty_app_percent=50
ro.sys.fw.trim_empty_percent=100
ro.sys.fw.trim_cache_percent=100
ro.sys.fw.bservice_enable=true
ro.sys.fw.bservice_limit=5
ro.sys.fw.bservice_age=5000
ro.sys.fw.trim_enable_memory=128000000