Possible ram fix for 4.3, NEED TESTERS!

So a while ago I discussed with my friend rohit joshi (developer of tegra overclock) about a system file called adj, and how it may be responsible for sometimes disturbing ram behaviour. It couldn't be adjusted AFAIK on 4.1, but it seems to allow modification on 4.3.

1: Mount system R/W

2: Open /sys/module/lowmemorykiller/parameters/and open the file named adj

3: Change it to the following: 0,10,25,50,80,150 and save the file

Now please observe ram management in intense situations such as using chrome or heavy games, so far I have noticed no irrational behavior like asphalt 8 committing suicide etc, but its early days and we need more data. Custom values are welcome but please mention what you used

Hmm this isn't really it's purpose, also these values fluctuate on their own btw . It's supposed to stop foreground processes and other important stuff from getting killed in low memory situations, for example once my alarm stopped responding because I was busy extracting a zip file. This fix is for this kind of wierdness

I change mine to 8192,16384,18432,24576,32768,65536 or 32,64,72,96,128,256 Mb

so far so good... will se over a longer period of time...

I changed them this way simply based on advice given, as I say different values are welcome I don't fully understand it myself however what I know is it seems to be working. I have been told that newer snapdragon devices have different adjacent values to other phones. This causes apps that SHOULD be closed to instead not be closed and so the system resorts to closing your fave game or whatever. Adjacent and minfrees have a relationship but I'm not sure exactly how it works, will try and find some better info on it

asphalt 8 close by itself if i play tokyo track.. on other track game works nicely

Hmm just spotted your comment there, I've been running Tokyo fine on high graphics, have you done anything else to the ram like change the minfrees? Feel free to play around with these values and report if you have any luck

Hmm just spotted your comment there, I've been running Tokyo fine on high graphics, have you done anything else to the ram like change the minfrees? Feel free to play around with these values and report if you have any luck

Lol, I just got the dreaded home crash! Will continue to experiment, it makes no sense how bad it is, I just ran this game on high graphics on a galaxy s2 and homescreen didn't even redraw when I was done!

According to http://forum.xda-developers.com/show...48587024309106
adj values determines how apps will be killed in case of Out Of Memory situations
Numbers are, similar to minfree settings connected to
ForegroundAPP, VisibleAPP, SecondaryServer, HiddenAPP, ContentProvider, EmptyAPP and hence the numbers
0,58,117,235,529,1000
The higher number, more probably the process will bi killed.

Quote:

You can say "if free memory goes below XXXX then kill some process with oom_adj greater then YYY; if free memory goes even more below than ZZZ then start to kill some processes with oom_adj greater than XYXY. and so on.."

So, values 0,10,25,50,80,150 for adj
will give results but also kills too many processes, maybe some important ones.
Maybe someone that have expeirience with linux kernels can answer the question:
Who sets oom_adj parameter of a process?
IMHO, by setting these adj values, you tell system to treat all processes with oom_adj higher than 150 like EMPTY_APP
Will try changing adj settings but perhaps with some less agressive parameters... let's say half of the original

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer?