Low Memory Killer, Zram settings for 2GB Ram - Android Q&A, Help & Troubleshooting

For reference, phone is on lineageos android 8.1, has 2gb of ram (1807mb to be exact). I currently have set zram at 256mb.
From monitoring personal usage, android straight up uses 1gb of ram (it goes as low as 900mb after internal app force kills, and as has a 1.2gb after opening some light apps but no internal app force kills).
For example, I know that if I play pokemon go, it will sometimes kill running background apps (like afwall and betterbatterystats), despite having 'enough ram'.
What I mean by this is, before launching pgo, the os with everything running normally (example- tasker, afwall, betterbatterystats) ram usage will be at 1gb.
After pgo launches, the game will use ~600mb of ram. This should leave a safe 200mb of free ram. However, any time I switch out of the game, android will kill the app despite ~200mb ram is free.
Playing pgo will also sometimes background apps as I mentioned, but it feels completely random. I could be doing the same stuff for 10 mins and it will kill the apps, but sometimes, I could be playing for 20-30mins and no background apps are killed.
I've played around with the LMK settings a bit, and I admit I don't understand the settings despite reading on the little, outdated documentation on it.
I don't know if the 256mb zram counts as reserved/invisible ram, but I did set it at 0 and didn't feel a difference.
I also tried the 'ram management fix' magisk module and again, didn't feel a difference.
tldr - How do you properly set LMK and zram settings. From personal usage, android seems to never use the last 200mb of ram for me and starts killing apps despite having ~200mb of free ram.

My answer may no longer serve you, but I hope to help other people.
As you already mentioned, the lmk cleans several applications before reaching that limit (minfree 200mb) the higher the number ... the more applications it removes, although drastically reducing the values would cause a ram saturation and give performance problems. I recommend that you put these values 9806,14136,17848,21560,24448,28278 and 1gb of Swap by default for 2gb of ram

Related

[Q] disappearing RAM

Hello!
I've had the atrix for a couple of days now, and have noticed that some ram is disappearing.
I use advanced task killer, but I don't have it set to autokill. Instead, I just press the widget as a kill button occasionally throughout the day. I haven't modded the application to kill certain things, or to not kill certain things. It is functioning just as it is downloaded.
So in the morning, after a fresh restart, i pressed the kill switch and i had 550 mb of ram (roughly). This was constant for a few hours. then around lunch time, i pressed kill switch and i had 460 something. Than now around dinner time I have only 370 something mb of ram.
Is there something that I'm missing? Like system apps opening throughout the day that are unaffected by task killer?
Anyone have any advice as to managing apps because the atrix (and motoblur) try to run a lot of them.
Also, I thought this phone has 1 GB of ram. I guess some of it is tied up in things behind the curtain
Check the ram usage on your computer, install a few programs that have services that run, then look at your ram usage.
Same thing.
regarding the ram usage. I cant figure out what the phone is doing with 500mb of ram all the time. This os is able to run on other android devices with only 512mb of ram and consistently have 200-300 free mb of ram. What is the Atrix doing with all that ram?
being prepared for docking...
Webtop/media center/ etc...
skaboss610 said:
regarding the ram usage. I cant figure out what the phone is doing with 500mb of ram all the time. This os is able to run on other android devices with only 512mb of ram and consistently have 200-300 free mb of ram. What is the Atrix doing with all that ram?
Click to expand...
Click to collapse
RAM not used is analogous to RAM not present in a way.
Android loads and keeps apps ready in memory for quick launch times. They are just loaded and kept, 0 CPU usage for any of them.
If u want to know more, check the thread 'android memory management' (link in my signature).

Memory Usage at Startup

How much memory do you guys generally see as "available" when you first start up your phone. I generally have 160-180mb of supposedly "used" memory. This is after a root and almost all possible bloatware being removed. Normally I would just figure it'll be freed up when I need it but I have had such issues playing Dungeon Defenders which is memory intensive. Sometimes it plays smooth as a champ, other times it stutters a lot. Other times it freezes during load times.
So is all that memory available and it'll just free it when it needs it? Or is that number unusually high?
Oh also my comic book viewer will force close sometimes on some images, even with its options set to use less memory, and I don't think it takes hundreds of MB of ram to open a zipped 500kb image. Then again I could be wrong.
Memory is used differently on Android than on your PC. Just because you have 100+ megabytes of available memory doesn't mean an application can use all of it. Each app has a hard limit of how much RAM it can use, which I believe is around 16mb but differs from device to device.
If you experience issues when running a game I would check to see what background services are running at the time that could be using up CPU cycles.

ROM with more available ram

Hey guys,
What i9300 ROM uses the least amount of ram?
My stock rom uses some 600mb after a reboot, and about 680mb after clearing ram.. I only have some 150mb available for apps, and even that amount isn't fully used, as some 50 megabytes are never used.
Background apps such as Skype always get killed by the system, even with persistent notifications, the launcher reloads all the time, it's impossible to switch between 3 applications without one of them reloading and losing progress, slowing me down and wasting my time.
Do you know of any roms that use 300-400 megabytes of ram?
Thanks.
Perhaps look into changing oom or "Out of Memory" values instead. It can easily be done with an init.d script, but if you need an easy way to do it, look for the V6 supercharger script.

[Q] Free ram 0.0bytes android 4.1.2 [low memory msg for all apps & frequent crash]

[Q] Free ram 0.0bytes android 4.1.2 [low memory msg for all apps & frequent crash]
Hi!
I bought iball andi 5li android smart phone a few days back. The configuration of the phone is:
512mb ram
4gb internal
1.2ghz cortex a9 processor
android 4.1.2
Although my device runs almost every app out there (including temple run, subway surfers etc.) but occasionally im facing problems.
problem occurs after 3-4 days of restarting the phone.
when i restart and check the ram usage it says 350 mb (approx) as used and 150mb(approx) as free ram every app runs smoothly but as days pass by gradually the free ram starts decreasing down to 30 mb where all the apps (games and browsers) start crashing with a low memory message. then the conditions get worse after approx 2 hrs free ram is now 0.0 bytes and even the launcher,settings etc crash with a low memory message. The only solution out is to restart the phone.
[used androids before and is quite aware of closing or killing apps but none is working]
Already Tried:
# removing apps from recent list
# stopping apps from Setting>apps>running apps & cached apps as well
# restoring to factory defaults
# used ram freeing apps (no change on ram)
Well just like on PCs if you keep your phone running for quite a while a lot of dead apps will fill your RAM and reduce performance, the workaround as you know it is restarting your phone.
I don't know that how this can be permanently solved. I myself restart my phone after one or two days.
Regards,
RaHBeR
Sent from my A2 using xda premium
One of your main issues is that your ram is the min to even run Android. With 5.0 they are supposed to optimize it for devices with low ram. Not a whole lot you can do right now.
Wayne Tech Nexus
a little fix
it is a common problem with all low ram devices
root your phone and install greenify (or maybe greenify pro with xposed framework ) and hibernate those apps that are using the ram on your device u will get much more free ram now explore around a bit

[Q] how to get more free ram

how to get more free ram?? i have mmx a92. it lagging.. plz help (using Ram booster Pro)
Apps (activities) are usually cached, and "use" RAM. When RAM is needed, though, cached apps are "killed" to make space. This is all handled by the LMK (you can Google it if you want more information,) automatically. So in a certain aspect, free RAM is wasted RAM - if it is needed, it'll be made available. Struggling to get more free RAM is useless.
Take killers are also bad... Not only do they go against what I described above, but some apps use services. Those run in the background to provide various utility to the app, and can restart when killed. Task killers will kill them, but they'll only restart. So you'll only be gaining more CPU usage, more battery draining, and your task killer will actually be using RAM for itself.
In short: it'd probably be best if you got rid of your task killer, and learned to stop worrying (about the RAM) and love the bomb.

Categories

Resources