yashsingh1/xdaforums huggingface dataset:
[Galaxy S6 Android Development] lizaSB:
Are you running xtrestolite? People there reported losing the toggles without applying the values. Seems more like a rom issue... Been running 1.4 messing with these values and this hasn't happened once to me.

Just reflash your rom base and reapply the settings. Probably won't happen again
[Galaxy S6 Android Development] edgarf28:
The missing toggles problem is NOT an XtreStoLite bug.

Many people are reporting the problem with different ROM's, even on non-rooted stock firmware.

See here: http://xdaforums.com/galaxy-s6/general/pic-mobile-data-gone-quick-settings-menu-t3133087
[Galaxy S6 Android Development] lizaSB:
No offense meant Edgar! Been using 1.4 very happily and haven't run into any of these issues. Regardless, it's not the rom and it's not the tweaks... Though, like I stated earlier, I think I dirty flash of whatever you're running should iron it out
[Galaxy S6 Android Development] Tron666:
Too complex. Can't this be made into a flashable zip?
[Galaxy S6 Android Development] lizaSB:
When we settle on "the best" values, sure, maybe. There is still a logistical problem in that everyone has a different build.prop. You can't just push the whole prop because people have their own tweaks that will disappear. Writing a script to append the file will get messy very quickly.

You can find some kernels that baked this in if you're a super sleuth, but then the values are not changeable beyond what is written in the RAM disk.

Until then everything is considered a test, this is the best way for now because it's quickly editable and you can play around with the values yourself and maybe even help contribute
[Galaxy S6 Android Development] -JFK-:
Hello,

Can we add version to the different settings?

It will be easier to report.

I'm testing the last one (V1.5 if I remember well) and will report ;)

Edit: from now, no lag and well multitasking.

Good good good!

The last test version seems to be the best one for my phone from now.
[Galaxy S6 Android Development] neferym:
Last? Could you please give it plz. Thanks!
[Galaxy S6 Android Development] -JFK-:
Check post #60
[Galaxy S6 Android Development] Cygnuss:
I am using the settings of post #60 and they seem better compared to all others, thanks for your work on this
[Galaxy S6 Android Development] mikeyinid:
Its definitely not any specific rom issue. People from vzw and att have been the main ones reporting missing toggles, and not just data. The toggles are set according to your csc, and stored in settings.db so its very confusing.

Probably won't happen, not from me anyway. Everybody's build.prop is different. And I'm not big on making flashable zips lol

Always very helpful. Thank you :)

Hopefully they remain stable after hours/days

Look back a page or two. Last set I posted

I agree. Lets see how they work long term.
[Galaxy S6 Android Development] Thoth33:
Never seen so much ram free lol.

Using:

#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.767
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
[Galaxy S6 Android Development] mikeyinid:
Holy smokes. You threw the kitchen sink in there lol. Free ram is good, but how's multi tasking?
[Galaxy S6 Android Development] Thoth33:
Multi tasks like a beast and ita been running all day without lagging.
[Galaxy S6 Android Development] Okarina26:
Here you go..:p
[Galaxy S6 Android Development] Thoth33:
Still doesnt beat my 59% free :]
[Galaxy S6 Android Development] eldode:
how do u get 50 % free of ram

iam on stock and it's 20 % free only so i when i end all programs it gives me 80 % ram usage

can u tell me how to free my ram for better ram usage ?

thanks
[Galaxy S6 Android Development] neferym:
Just put it a the bottom of build.pro?

Ty!
[Galaxy S6 Android Development] edgarf28:
For me these settings are working the best:

#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

I feel a nice speed improvement with these settings, and also multi-tasking is working perfectly. And doesn't slow down after some time for me.
[Galaxy S6 Android Development] jah2110:
I try to your configuration and is the best for now, but is possible this use more battery? maybe you can add to new build :) thanks.
[Galaxy S6 Android Development] mikeyinid:
Thanks for sharing!
[Galaxy S6 Android Development] -JFK-:
There:
[Galaxy S6 Android Development] droid_1989:
That's where I have put mine, but I'm not really sure if I've seen a difference. :/
[Galaxy S6 Android Development] Thoth33:
What are these for?

ro.config.sdha_margin_min_low=20
ro.config.sdha_margin_min_high=60
[Galaxy S6 Android Development] Quickvic30:
Looking pretty good here with the settings 4 posts above. Thanks!
[Galaxy S6 Android Development] Тhe Dark Knight:
Please delete this post.
[Galaxy S6 Android Development] mikeyinid:
Not sure. I've messed with them a little. Didn't notice anything right off.
[Galaxy S6 Android Development] Thoth33:
What have you tried? There's five ways to mess with the range i can imagine. Move both up, move both down, tighten, expand, swap.

Swaping would prolly break it. other four may make a diffence.

Ive been trying to find reading material on DHA/SDHA but can find anything.
[Galaxy S6 Android Development] mikeyinid:
I found a little documentation on it...in Chinese. Other than that there isn't anything to go off of. Samsung knows, maybe.
[Galaxy S6 Android Development] Thoth33:
Margin makes me imagine it represents a limit.

I will try

ro.config.sdha_margin_min_low=10

ro.config.sdha_margin_min_high=90

and

ro.config.sdha_margin_min_low=30

ro.config.sdha_margin_min_high=40

and will report back any finding.

What would be especially helpful would be benchmark programs to measure sucess/failure ro test to run. What should I look for? Maximum achievable free ram? Most opened apps w/o redraws? Not sure what I should be. . . measuring.

Edit

What I did:

Before changing any settings I rebooted. Then I opened every app on my phone, and tested for redraws. Then i opened my ram checket and noted the % free. I cleared ram and noted % free, closed all apps cleared ram and noted again. I then applied he changes, rebooted and ran the same test. Reaults were

Default

22% 49% 53%

Expanded

22% 51% 55%

Tightened

25% 51% 51%

I am now going to see how expanded setting lerforms over time.

Edit.

Tested two more. 10/30 and 30/90

Lowered

23% 51% 52%

Raised

23% 50% 51%
[Galaxy S6 Android Development] -JFK-:
We have 3g of RAM.

We should use it all.

The real goal for me is to get the best multitasking, not the maximum free RAM...

Antutu provide a mulitask bench.
[Galaxy S6 Android Development] mikeyinid:
I'm with you, use as much ram as possible without losing stability
[Galaxy S6 Android Development] droid_1989:
Can someone check this pastebin link to my build.prop file and let me know if there's anything else that needs to be done.

When i'm sat on my home screen, the ram is at 80% ish...

http://pastebin.com/1BrXNEg2
[Galaxy S6 Android Development] Thijssie909:
Does it matter where the values are put in the build.prop? No right?
[Galaxy S6 Android Development] Thoth33:
Thank you for this useful post.

I benchmarked them all in antutu, careful to control for all other factors.

The two settings with margin min set to 10 clearly out pefformed the others.

I will now fool around with 10/x0 setting and see what looks best.

Edit:

These were best. Significant improvment in multi and ramspeed over default

ro.config.sdha_margin_min_low=10
ro.config.sdha_margin_min_high=50
[Galaxy S6 Android Development] Cygnuss:
great work gyus :)
[Galaxy S6 Android Development] osmosizzz:
So far, this one has been working well. Multitasking is how it should be and so far, no lag or slowdown. Very happy camper right now. Anyone else try this? Maybe we should get a few people to monitor a few days and see if it works well. If it does, consider multi tasking fixed
[Galaxy S6 Android Development] C_Karhu:
Can I use the settings in S6 edge? Is it the same?

---------- Post added at 01:29 PM ---------- Previous post was at 01:21 PM ----------

Tried these settings in my edge, seems to work! I have about 10 apps in memory without any if them reloading. Also uses about 90% ram, looks good so far!
[Galaxy S6 Android Development] -JFK-:
I guess not.
[Galaxy S6 Android Development] albysajan:
So the ram management problem is pretty much fixed now? :)
[Galaxy S6 Android Development] Alpione:
Agreed. This needs to be stressed. Keeping RAM free at all times does nothing but wastes that RAM. It can be a useful indicator at, say, boot time, but once you get going you should use the 3gigs available.

A
[Galaxy S6 Android Development] auiterwaal:
However, I have a feeling that if you have less RAM then needed for an app you are going to open next is not good, since phone will first kill something loaded and just after process your query to open the new app.

I may be wrong...

Enviado de meu SM-G920I usando Tapatalk
[Galaxy S6 Android Development] Alpione:
I agree that there needs to be a balance. Freeing memory from unimportant running services, particularly auto-started at boot, is good. Artificially keeping memory free and using Free Memory as the most important stat while using the phone is less good. :)

A
[Galaxy S6 Android Development] mikeyinid:
Wait til everyone gets 5.1.1. You think 5.0.2 is bad...

I can't find any DHA settings that work even a little. It's disappointing, to say the least.
[Galaxy S6 Android Development] RaymondPJR:
What would that mean? That Samsung hard coded the kernel settings to override build.prop?
[Galaxy S6 Android Development] mikeyinid:
no, they didn't set any dha values in the kernel. I unpacked the boot.img though, been messing with some dha values and its impossible to find anything that works even halfway decent.
[Galaxy S6 Android Development] ShadowVlican:
yikes.. so you guys have to start searching for values again in 5.1.1 ?

the media ought to give this problem more negative press to pressure Samsung into a fix... there's no reason why a 3GB flagship phone has to reload apps so damn often
[Galaxy S6 Android Development] Gunthermic:
So many suggested settings in several threads. [MENTION=2918779]mikeyinid[/MENTION] what are your final suggestions?

I saw somewhere you started to fool with swap stuff now?
[Galaxy S6 Android Development] mikeyinid:
I did. Samsung sets swapiness to 130 which just dumps everything to swap. zswap max pool percent is 20 by default, so it'll only use up to 20% of ram to compress things. So I turned swapiness down and pool percent up, hoping to keep more in ram. works ok. 5.1.1 realyy is worse than 5.0.2. Let me get a couple things sqaured away and i'll post something for everyone to hopefully get improved multi tasking without totally killing performance.
[Galaxy S6 Android Development] Тhe Dark Knight:
[MENTION=2918779]mikeyinid[/MENTION]. I disagree with you. 5.1.1 has much more better multitasking. At least for me. Now Chrome doesn't close every time I minimize it.
[Galaxy S6 Android Development] mikeyinid:
That isn't what I'm experiencing. Are you on the international S6? If so could you pull the build.prop for me?

adb pull /system/build.prop

Paste into pastebin and link it here?
[Galaxy S6 Android Development] Тhe Dark Knight:
Sure. Here you go
[Galaxy S6 Android Development] mikeyinid:
Yea, your DHA stuff is different than T-Mobiles
[Galaxy S6 Android Development] ktetreault14:
Better then?
[Galaxy S6 Android Development] Тhe Dark Knight:
And the most important, no more memory leak. With 5.0.2 on second or third day I got lags due to RAM leak. Now I don't have that problem. It's not perfect multitasking, but much better than was.
[Galaxy S6 Android Development] RaymondPJR:
The thing is the masses have no idea there is any problem at all.
[Galaxy S6 Android Development] ordevski:
Lag after update!

I have terrible lag after updating to 5.1.1. I did it with odin, no clean install. I don't want to wipe the phone, do you have any suggestions?
[Galaxy S6 Android Development] daffie:
Yes...do a clean install :eek:
[Galaxy S6 Android Development] mikeyinid:
Did you edit these values AFTER you updated?
[Galaxy S6 Android Development] MariosFFX:
In order to use this

do I have to also add the following lines like the instructions say in the other thread at the end of build.prop

# MultiTasking Tweaks
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

OR

just add

and remove any duplicate lines I might find in build.prop?
[Galaxy S6 Android Development] mikeyinid:
You can add any lines you want. Just be sure you don't have any duplicates. Mess around with different values and find what works best for you.
[Galaxy S6 Android Development] mikeyinid:
In 5.1.1 they changed a bunch of stuff in services.jar. There is a new line, ro.config.fha_enable=

with a whole new set of values. set that line as true in your build.prop, comment all dha lines and see what you guys think.
[Galaxy S6 Android Development] kiko3:
Is that on all 5.1.1 roms or only in leak for galaxy edge.
[Galaxy S6 Android Development] mikeyinid:
All.
[Galaxy S6 Android Development] daffie:
I don't find this particular line in my build.prop. Do I add it consequently? Btw I already use the DHA settings you gave us earlier. Those seem to work pretty well on 5.1.1 rom...

http://xdaforums.com/galaxy-s6/development/research-memory-management-dha-t3132060/post61325025
[Galaxy S6 Android Development] mikeyinid:
FHA is not enabled in services.jar adding the line

ro.config.fha_enable=true

enables it. I'm fairly certain you don't want dha AND fha lines in build.prop. They have similar lines with different values. So add the fha line and either comment out or delete dha lines.
[Galaxy S6 Android Development] daffie:
Ok thanks. Just to make sure...the line needs to be added in the build.prop ?

Edit : nevermind...build.prop it is ;)
[Galaxy S6 Android Development] datajosh:
I've only been running this for a little bit but it seems better for me than any DHA tweaks so far.
[Galaxy S6 Android Development] daffie:
Yeah this seems to work pretty well...had 14 apps opened (of which Chrome is a notorious early-quitter ;)) without any problems or automatic shutdown of apps.
[Galaxy S6 Android Development] mikeyinid:
They're definitely going in the right direction. I think there is still work to be done but glad to know they're actually working on it. I've been using the FHA line with a larger swap and swappiness of 60 and max pool percent at 50. No issues for me.
[Galaxy S6 Android Development] daffie:
I'm still a bit confused to be fair...I only added the one line to the build.prop and removed all other DHA lines from build.prop. Am I correct in assuming this is it...or am I still missing some additional settings?

Thanks again... :good:
[Galaxy S6 Android Development] datajosh:
Any change to vfs cache pressure? And are you still using 2558973740 for the swap size?
[Galaxy S6 Android Development] mikeyinid:
Cache pressure at 50, and yes to swap size
[Galaxy S6 Android Development] Тhe Dark Knight:
Sorry for a noob question but how can I do that? :) FHA line already in build.prop and I see that it helps. So I need that trick with swappiness and max pool.
[Galaxy S6 Android Development] daffie:
+1 curious to know this as well...
[Galaxy S6 Android Development] woeds:
Can someone tell me the exact swap/swappiness lines to add to the build.prop?
[Galaxy S6 Android Development] Gilg@mesh:
you have to use the kernel adiutor app.

https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
[Galaxy S6 Android Development] daffie:
Cheers for that. So I can set Swappiness and Vfs Cache in the Virtual Memory settings of the app. But where do we set the Max Pool % and Swap Size ?
[Galaxy S6 Android Development] big_adventure:
The swap changes are done using init.d scripts. So you need a ROM which supports same.
[Galaxy S6 Android Development] big_adventure:
I'm trying out your settings - FHA on and at defaults, all DHA lines yanked from build.prop, and init.d setting :

/sys/module/zswap/parameters/max_pool_percent = 50

/proc/sys/vm/swappiness = 60

/proc/sys/vm/vfs_cache_pressure = 50

/sys/block/vnswap0/disksize = 2558973740

It all seems to be working fine for the time being (16 hours). I'll experiment with trying to blow it up a bit later.
[Galaxy S6 Android Development] appledroid:
What's the build.prop edits recommendation for 5.1.1?
[Galaxy S6 Android Development] daffie:
So how to change/add these lines to init.d ? I have found System\Etc\Init.d map. How do I proceed?

(I have already changed settings in the kernel adiutor app for : swappiness and vfs cache)
[Galaxy S6 Android Development] mikeyinid:
This is actually what you want your script to look like...

#!/system/bin/sh

swapoff /dev/block/vnswap0

echo "2235894960" > /sys/block/vnswap0/disksize

mkswap /dev/block/vnswap0 &> /dev/null

swapon /dev/block/vnswap0 &> /dev/null

echo "50" > /sys/module/zswap/parameters/max_pool_percent

echo "60" > /proc/sys/vm/swappiness

echo "50" > /proc/sys/vm/vfs_cache_pressure
[Galaxy S6 Android Development] daffie:
Cheers...but which script do I change (which file and which location?), or otherwise how (and in which location) do I add a new file (script)?

Sorry, maybe a bit noob questions, and I do know a fair bit about custom roms and such, but I honestly don't have a clue how to proceed with this. Any help would be much appreciated :good:
[Galaxy S6 Android Development] big_adventure:
You simply make a file called /etc/init.d/whatever-you-want-to-call-it

Put [MENTION=2918779]mikeyinid[/MENTION]'s exact commands into it :

#!/system/bin/sh

swapoff /dev/block/vnswap0

echo "2235894960" > /sys/block/vnswap0/disksize

mkswap /dev/block/vnswap0 &> /dev/null

swapon /dev/block/vnswap0 &> /dev/null

echo "50" > /sys/module/zswap/parameters/max_pool_percent

echo "60" > /proc/sys/vm/swappiness

echo "50" > /proc/sys/vm/vfs_cache_pressure

When you reboot, IF your setup supports init.d scripts, it'll run automatically. If not, you can use the aforementioned kernel aduitor application to launch it.
[Galaxy S6 Android Development] daffie:
Thanks much for the help! I have done as you described and rebooted. Any way I can check whether the new settings are activated?
[Galaxy S6 Android Development] big_adventure:
Open a terminal emulator, enter :

su

cat /sys/block/vnswap0/disksize

If the returned value is 2235894960, it worked.

You can also just download the Kernel Aduitor app, open it, scroll down until you get to the SwapTotal value. It should be something over 2000000kB. If it's still 1300000kB, your change hasn't been applied. You can also go into the Virtual Memory page, and check swapppiness : 60 means it worked, something else means it didn't.

If your script hasn't been applied, go into the init.d tab in the app, click the script you built (it should see it automatically)

Something I may have forgotten to mention (since it is automatic to me), you need to change the perms on the file, if you have not done so :

su

chmod 755 /etc/init.d/name-of-file-that-you-created
[Galaxy S6 Android Development] mikeyinid:
Thank you for helping. I have a bad habit of assuming everyone would know this stuff :eek:
[Galaxy S6 Android Development] big_adventure:
Hey, no problem, I've been guilty of the same thing, on this very page. :D

OTOH, thank YOU for sharing the results of all the work you've put in on this. I don't have the time these days to dig that deep, so it's nice having someone else's experiences to lean on.
[Galaxy S6 Android Development] daffie:
Thanks again for your help...much appreciated.

I can see the file hasn't been executed yet. When I open up terminal and type in SU, I can see root@zerofltebmc. When I type in chmod 755 /etc/init.d/fha then terminal returns 'no such file or directory'. I checked and the file is in that dir. Also tried the command with system in front, but still no go. Any idea's ?
[Galaxy S6 Android Development] edgarf28:
It's /system/etc/init.d/fha
[Galaxy S6 Android Development] daffie:
Thanks, but that's what I tried as well...still no such file or directory....
[Galaxy S6 Android Development] edgarf28:
Can you post an screenshot of the content of your init.d folder?
[Galaxy S6 Android Development] edgarf28:
The command is case sensitive... so the command must be:

chmod 755 /system/etc/init.d/FHA
[Galaxy S6 Android Development] daffie:
Also tried this just now, but still won't work :eek:
[Galaxy S6 Android Development] edgarf28:
lol, the command above must work.

Can you maybe post also an screenshot of the command that you enter in the terminal app? :P
[Galaxy S6 Android Development] daffie:
Hey that's strange now I suddenly see a ' read only file system' message. I didn't get this before. All I did was just now was set SuperSU to

not

automatically grant permissions (I always use SuperSU to grant access automatically...it's easier), after which I restarted Terminal and gave root access.
[Galaxy S6 Android Development] edgarf28:
Ah of course! My fault... The /system partition is mounted as read only at default...

These 3 commands should work:

su

mount -o remount,rw /system

chmod 755 /system/etc/init.d/FHA

And then reboot.
[Galaxy S6 Android Development] daffie:
Thanks Edgar...this did work, or so it seems. I rebooted and fired up the kernel app...however it still shows the wrong swap file size (130000....). Not sure what to do now...?
[Galaxy S6 Android Development] Gilg@mesh:
same here, everything seems to be working, but the values still the same.
[Galaxy S6 Android Development] hardspartan360:
If you activate init.d emulation in kernel adiutor it will work.

Enviado desde mi SM-G920F mediante Tapatalk
[Galaxy S6 Android Development] Gilg@mesh:
sorry but it's already activated.

Tapatalked from my GALAXY S6
[Galaxy S6 Android Development] hardspartan360:
It's your script showing in the init.d section of kernel adiutor????

Enviado desde mi SM-G920F mediante Tapatalk
[Galaxy S6 Android Development] Gilg@mesh:
Yes it does.

Tapatalked from my GALAXY S6
[Galaxy S6 Android Development] edgarf28:
Strange, I'm using this init.d script file (see attachment), and it works (shows an SwapTotal of 2183488 kb in the Kernel Auditor app)

(unzip the zip file to /system/etc/init.d, and remove your old script, and set the correct permissions again for the new one)
[Galaxy S6 Android Development] hardspartan360:
And you set 755 permissions?

Enviado desde mi SM-G920F mediante Tapatalk

---------- Post added at 06:47 PM ---------- Previous post was at 06:42 PM ----------

Edgar, one question: the script it's working for you without activating init.d emulation in kernel adiutor? I'm asking cause for me it's only working if I do that. Wanam kernel btw.

Enviado desde mi SM-G920F mediante Tapatalk
[Galaxy S6 Android Development] edgarf28:
For me it's working without that option on my ROM indeed (because my ROM has native init.d script support)
[Galaxy S6 Android Development] hardspartan360:
I'm using Wanamlite. I tought it has init.d support. Maybe it's time to go back to your 2.0 odexed ?

Enviado desde mi SM-G920F mediante Tapatalk