Might the X2 have a memory leak? - Motorola Droid X2

I've had my suspicions about this since I first got the Droid X2. I think it may be possible for much of the lag many (most/all?) people experience at some time or another.
As a test, I can check free RAM in Advanced Task Killer when I first boot up the phone, and it will hover somewhere 150 megs with all user processes killed.
Then, when I check after 24 hours of constant use (with intermittent charging periods) I will struggle to get 100 megs with all user processes killed.
Finally, if I reboot the phone, I will be able to obtain a decent amount of freed-up RAM again.
Anyone experiencing anything similar?
Now, I must mention, I'm operating under the assumption that the X2 does not cache apps or files in the RAM. I suspect there is too little RAM at such a minimal speed to be able to clear RAM fast enough in the event that something non-cached is called on. I mean, even Microsoft was slow to use this cache method, as they first introduced it in Windows 7. A good example of this in Windows 7 is if you check the Task Manager, you will see that roughly only a quarter of your RAM is ever actually labeled as "free", even if you currently have no programs open or are using minimal amounts of RAM.
And it certainly doesn't feel as if the cache is working as intended if Motorola did infact implement it on our phones.

I have contimplated over this for quite some time and have also came to the same conclusion. But the real question is: What can we do about it?
Most likely nothing.

Not sure of this is actually the case but when V6 is ran for instance it does talk about cached apps and gives an "actual" free ram reading. I would guess that zepplinrox would not have worded it that way if it was not the case but I have no real evidence either way.
Sent from my DROID X2 using xda premium

This did happen to me when I ran Advanced Task Killer on cm7. I'd start with a very good 190 free ram (insane I know) and after a few hours I'd struggle to brake 110
Sent from my DROID X2 using Tapatalk 2

This is the nature of Android and Linux in general. When you start an app (or a process), it will remain in memory until it is cleared by the OS. The problem with task killers and Android 2.3.x and above is this: Android 2.3.x and above RESPAWN the killed task since the OS did not kill it. Plus, there is no way to FORCE to OS to kill an app that is in the background. What Android does is renice the process until it is a positive number, greater than 1, then it kills the process. Android 2.3.x was designed to "auto manage" those tasks. If you run htop from an ADB session and launch apps and use the back button to back out of them, you will notice that the amount of free memory diminishes. Then, after sitting for a time, the amount of free memory slowly begins to increase. When an app that requires a bunch of memory is launched, the Android will kill those background apps to free up more memory. In theory, it is a great way to manage the memory. In this respect, apps that have been launched in that past will start up faster. Personally, I like having control over things. You could possibly write a script that will renice a process to something like +20 and then Android will kill it automatically, but that would be a very risky prospect as it might kill RUNNING foreground apps as well.
Hope this little explanation helps!
Ciao!

DX2 Version History lesion / Android Process Cache
theredvendetta said:
I've had my suspicions about this since I first got the Droid X2. I think it may be possible for much of the lag many (most/all?) people experience at some time or another.
As a test, I can check free RAM in Advanced Task Killer when I first boot up the phone, and it will hover somewhere 150 megs with all user processes killed.
Then, when I check after 24 hours of constant use (with intermittent charging periods) I will struggle to get 100 megs with all user processes killed.
Finally, if I reboot the phone, I will be able to obtain a decent amount of freed-up RAM again.
Anyone experiencing anything similar?
Now, I must mention, I'm operating under the assumption that the X2 does not cache apps or files in the RAM. I suspect there is too little RAM at such a minimal speed to be able to clear RAM fast enough in the event that something non-cached is called on. I mean, even Microsoft was slow to use this cache method, as they first introduced it in Windows 7. A good example of this in Windows 7 is if you check the Task Manager, you will see that roughly only a quarter of your RAM is ever actually labeled as "free", even if you currently have no programs open or are using minimal amounts of RAM.
And it certainly doesn't feel as if the cache is working as intended if Motorola did infact implement it on our phones.
Click to expand...
Click to collapse
Your question is a bit complex. See back when Droid X2 first was released it had 2.2.3 for most users, and didn't have very good application memory management. This was the start of many applications such as "Advanced Task Killer" that you mentioned. These apps were supposed to help in closing apps that were running all the time.
Things changed a bit with the Gingerbread (2.3.3) release. This initial release made the Droid X2 useable. In my opinion the DX2 prior to Gingerbread was nearly a brick! I had many reboot issues, FC, connection issues, GPS issues, etc. With 2.3.3 many issues were eliminated, while others were reduced enough that they didn't bother me TO bad.
2.3.4 came out to fix battery issues largely...
Now I realize you weren't asking for a history lesion, but it is useful to know these things to know where things were and where things are today. I am currently running 2.3.5/412 and have been for months. I can say from experience, Android DOES cache background processes. I thought it did back in 2.3.4, but i can't remember... I don't think it did back in 2.2.x or at least the OS didnt' inform the users via GUI.
Your question about performance though? Yeah the DX2 is crap! I love the physical layout, but it has MANY issues with performance... some have been reduced by doing build.prop edits, yet I have realized that many who post these edits have posted wrong.... for example, they are increasing the buffer sizes thinking this will help internet speeds. This is super complex, but Google "Buffer Bloat" and you'll see how larger buffers often mean greater throughput, but MUCH greater latency....
simply put... big buffer == faster download of individual files.... smaller buffer == slightly slower download but MUCH more responsive
I'm not sure if that answered your question or not... let me know how I did or if I just rambled perhaps =P

Related

833MB of RAM ? why is this please?

In the SGS task manager the RAM (after everything has been cleared states 291MB/833MB why is this please?
Thanks
jameslfc5 said:
In the SGS task manager the RAM (after everything has been cleared states 291MB/833MB why is this please?
Thanks
Click to expand...
Click to collapse
Answer is simple, total ram is 1024 Mb but the gpu required 129 mb. So the rest remains for programs. 291 is used by android system.
thats 542 mb free. my galaxy s when cleared shows 154/304 so only 150 free. Well over 3 times the amount is very impressive.
I hope that dosent mean theres just 290 free ram, but it might be the case. my DHD has 768mb ram and im usually around 200mb free all the time, sometimes even like 115mb when i use a few apps. android has some serious ram eating issues.
sharkonland said:
I hope that dosent mean theres just 290 free ram, but it might be the case.
Click to expand...
Click to collapse
It seems to indicate theamount of *used* RAM.
On my GII...
Samsung's Task Manager: 233MB/833MB
TasKiller: 596 M Available memory
The operating system is supposed to fill up the RAM as much as possible, Android is trying to utilize the resources at their best. "Free" RAM doesn't mean a thing, it is better used as a cache. Parts of that cache will be dropped as soon as an application needs more RAM. Windows uses RAM in a similar fashion.
You shouldn't run any "RAM freeing"-programs as they are counterproductive - typical snake-oil software.
PartyMango said:
You shouldn't run any "RAM freeing"-programs as they are counterproductive - typical snake-oil software.
Click to expand...
Click to collapse
I'm all for putting my RAM to good use, the reason why I use a TaskKiller is to exit apps which after a day of use continue to run even though I'm not using them / apps I forgot to exit.
PartyMango said:
The operating system is supposed to fill up the RAM as much as possible, Android is trying to utilize the resources at their best. "Free" RAM doesn't mean a thing, it is better used as a cache. Parts of that cache will be dropped as soon as an application needs more RAM. Windows uses RAM in a similar fashion.
You shouldn't run any "RAM freeing"-programs as they are counterproductive - typical snake-oil software.
Click to expand...
Click to collapse
Of course, but it just amazes me how much ram is needed by android. I say this because, on every android phone ive had to date, once the ram goes below 150mb, things start to really get choppy, i dont know why. I assumed by that point, every app i would use is already in the ram so it should actually make things faster, but normal things like opening apps and scrolling through menus start getting very choppy, even in apps things are choppy which lets mek now ram is low. Thats when i realize i need to do a quick reboot.
In that sense, i really have a lot of respect for apple, they do some crazy ram optimizations. I know they dont have things like widgets or whatever, but everything runs like butter, also you have to admit the iphone4 has a very high res screen and the apps are much more visually taxing but they are damn fast. But with 1gb of ram, I doubt we will be running into these issues.. I wonder if the SGS3 will have 2gb ram..hehe
sharkonland said:
Of course, but it just amazes me how much ram is needed by android. I say this because, on every android phone ive had to date, once the ram goes below 150mb, things start to really get choppy, i dont know why. I assumed by that point, every app i would use is already in the ram so it should actually make things faster, but normal things like opening apps and scrolling through menus start getting very choppy, even in apps things are choppy which lets mek now ram is low. Thats when i realize i need to do a quick reboot.
In that sense, i really have a lot of respect for apple, they do some crazy ram optimizations. I know they dont have things like widgets or whatever, but everything runs like butter, also you have to admit the iphone4 has a very high res screen and the apps are much more visually taxing but they are damn fast. But with 1gb of ram, I doubt we will be running into these issues.. I wonder if the SGS3 will have 2gb ram..hehe
Click to expand...
Click to collapse
The ram issues on Android are because of how it's designed.
iOS each app has it's slice of RAM that is managed completely by the app itself. When the app exits, the OS doesn't check anything, it just flushes the whole piece of RAM, which is very quick. When 'multitasking' and the phone runs low on RAM, it can quickly flush the ram on any 'background' app without having to do any checks.. very fast operation.
Android has a far more complicated structure, with the Android system managing the RAM within each app. Each app is broken into separate blocks (activity, service, etc) and while the whole app can be flushed (with a force close), Android doesn't do this. When Android is low on RAM, it follows a set order on what to close first, such as unused activities. This takes quite a lot of calculating and slows stuff down.
All those complications are 'fixed' with the SGS2 though. Dual core means the calculations don't bother your running task. High ram means the calculations don't happen often. Works very nicely.
i use tittainium backup and freeze unwanted apps, i get around 650-700mb free
The SGS2 has 1024MB of RAM. 833MB is available to the Android system and the rest is used by the radio.
I would like to ask some users...
Somebody reported that they have 910MB of TOTAL Ram.. Some have 830+
How can i know this?
BlackRainX said:
I would like to ask some users...
Somebody reported that they have 910MB of TOTAL Ram.. Some have 830+
How can i know this?
Click to expand...
Click to collapse
Task Manager
Hold down the Home Button
Task Manager
RAM
Sent from my GT-I9100 using XDA App
Yep but i want to buy it from e-shop where i cant see the amount of ram..

[Q] Where is my RAM?

The Atrix has 1GB of RAM, so I'd expect a good portion of that to be free at all times. But that's not the case. With normal usage I usually only have about 180 MB free. Even after killing everything with Advanced Task Killer, I only have about 230 MB free. This doesn't seem much better than most other Android phones. What's eating up my RAM? I am running a live wallpaper, but I'd still expect 1GB to go a very long way.
MdX MaxX said:
The Atrix has 1GB of RAM, so I'd expect a good portion of that to be free at all times. But that's not the case. With normal usage I usually only have about 180 MB free. Even after killing everything with Advanced Task Killer, I only have about 230 MB free. This doesn't seem much better than most other Android phones. What's eating up my RAM? I am running a live wallpaper, but I'd still expect 1GB to go a very long way.
Click to expand...
Click to collapse
Many threads explained this already.
http://forum.xda-developers.com/search.php?searchid=75092117
Also, ditch ATK.
Search is your best friend. I should know this by now. Thanks.
And why ditch ATK? I feel like my phone runs cooler with it. Plus, GingerBlur doesn't have the Task Manager that comes stock with the Atrix. Or is a Task Manager really not necessary?
WiredPirate said:
Also, ditch ATK.
Click to expand...
Click to collapse
+1
Atrix already handles task killing as needed very well. With task killer, they will just start up again anyway. Let the Atrix handle this function.
Auto mem killer... people who quote the age old "android handles memory fine" argument are simply rehashing an age old argument without an explanation.
#1 "kill all" is silly.. (it kills functions that start back up regardless thus chewing up battery)
#2 you can tweak the android memory management system with root and automemkiller
#3 it is good to have a task killer for rogue apps.
Sent from my Googletron
ChongoDroid said:
Auto mem killer... people who quote the age old "android handles memory fine" argument are simply rehashing an age old argument without an explanation.
Click to expand...
Click to collapse
-1
I was quoting the Atrix as handling memory, not Android as a whole in your age old argument!
The ATRIX does handle tasks fine on its own, no need to kill them. OP, I should have said ditch ATK for Watchdog.
lol your RAM is in your phone dude! xD
kidding
you must be using to many apps, try a task manager, i use advanced task manager(paid version), and got always 500mb+ of free memory, it just goes to 200mb free when im playing some game(mc2, gangstar or riptide gp) with the music player opened plus firefox 4
look well which apps are eating your memory, and put in auto end list from the original task manager =)
but 230 free still a lot of memory in a phone =p
Most current devices have 20-30mb free at any given time, be happy for your 200+
this is normal behaviour for alot of linux based os'es - linux tends to steal alot of the free ram for file caches etc and releases it s requested by apps.
Usually ATK results in 400-500MB free on my Atrix so that 230MB does sound strange.
Also, I don't notice any difference in performance or battery life between using ATK and letting the OS handle everything. Under the four occasions that I've seen a process eat up CPU (pegging it at 1GHz and making the phone warm), ATK was powerless to stop it... So ATK is pretty useless IMO.

ram used up

I find that every time I check I am using 470+ ram even after I clear it in task. wtf?
stop clearing task then. its not needed as soon as you do this the required parts will just start back up. you havnt needed to use anything like advanced task killer since android 2.0 we are now on 2.3 time to stop making ur phone use more battery life.
So your telling me that next to stock I should be using up 3/4ths of my ram with no windows or programs opened. Sounds strange to me
yup.. Its how android works.. its not like say the way windows mobile used to be.. having to kill off programs left an right. android keeps those apps in the ram for a reason.
I comprehend the keep running in background, my point is some, I haven't had to bad, people complain of lag or lack of smoothness. Well if I am using all my ram for things running in background am I not restricting the amount I can now pull up. Like I said I am close to stock, couple apps installed, and stock is loading 4-500 megs out of my 750. Hmmm just saying ya know. If you sell me on gig of ram and cut it down to 750 and load it up with 500 in all honesty you are giving me 250. might as well call it an iPhone....hides head and runs.
ghettopops said:
I comprehend the keep running in background, my point is some, I haven't had to bad, people complain of lag or lack of smoothness. Well if I am using all my ram for things running in background am I not restricting the amount I can now pull up. Like I said I am close to stock, couple apps installed, and stock is loading 4-500 megs out of my 750. Hmmm just saying ya know. If you sell me on gig of ram and cut it down to 750 and load it up with 500 in all honesty you are giving me 250. might as well call it an iPhone....hides head and runs.
Click to expand...
Click to collapse
U are WAY off. The phone is allocated a certain amount of ram for its internal workings. Leaving you the 700+ ram for apps and other things. Ur phone works better if u let it manage Ur ram for u. It will naturally kill off apps as u need more ram for other processes that are being called on. Free ram is wasted ram using the ram will actually make Ur phone smoother. And if Ur not using the super charger script i would take a look at it. It helps as well. Or get Rom tool box and do it manually.
Sent from my SAMSUNG-SGH-I717 using xda premium

New User Wants to Thank Group

I've been quietly lurking on this site for about 2 weeks since I got a nook tablet (16GB) with an N2A card (which was horrible). I came to this site looking for a way to mod my device and ended up learning a lot more than I intended. I have sampled quite a few ROMs on here and am astonished at the amount of work that has gone into these ports. I have a device that is so much more functional it's not even funny. Already I've reclaimed the space that BN had partitioned from users. I still have a lot to learn but I wanted to express my thanks to all the developers who work hard on these. I am very appreciative that a device which is technically 'obsolete' can be revitalized and turned into something very usable. I am still trying out various ROMs to try to see which is giving me the best stability and RAM use. So far the one I am using I unfortunately forgot the name of. Any way of finding out which ROM you might have flashed? What I like about it is most of the ROMs use so much RAM I am left with around 200MB of RAM without anything running. One particular ROM I'm using consistently gives me around 400-450 MB of free RAM even with some background apps running. A HUGE improvement. A couple ROMS literally left me with less than 100MB. Anyway if anyone has any advice or happens to know how to determine which ROM I might be using I'd be very happy. Mainly I wanted to introduce myself and thank the developers. GREAT STUFF!
Some info that most Android users are not aware of, as its a bit non-intuitive:
Having less memory (RAM) available is actually a good thing. Apps can be "running" in the background without actually using the processor or other resources. They are cached via the RAM in order to allow you to relaunch them quickly. Android's memory management is quite good, albeit different from say Windows.
This is why Task Killers are generally a bad idea. I used to use them as a means to kill apps when they froze or whatever, but now, with the roms I have on my devices, I have set long-press of the back button to kill the current app, should I need to do this.
Read this article for a bit more info.
tl;dr less memory available is not necessarily a bad thing on Android.
Sorry for delayed reply
Forgive my tardy response. Our internet was out for 2 days. I understand what you are saying but what I was noticing was a huge number of active programs that were not in use, nor are commonly in use enough to justify their being cached. One particular ROM was leaving me with less than 200 MB of RAM with the same processes referred to above being inactive as well. A 200MB difference with the same stuff running. The particular one I'm on now keeps a number of things running in the background and still leaves me with well over 300MB with 4-5 programs going at the same time. So while I agree with you that some might be doing more cache than others, my experience is telling me the build with the most RAM (ie whichever one I am using...I unfortunately forgot which I installed...a CM10 but not sure if it was the cherry pick or chris'.) is the one that is managing the memory the best. I can figure out no other explanation for the same number of programs using an extra 200 MB of memory over another rom and thinking that is a good thing. For example, the ones I am thinking of are running stuff in the background I don't even use. Power Amp is a huge offender for whatever reason. I see no reason to have it running 24/7 but it does!

RAM

Is it just me, or does the phone use a lot of RAM? Mine seems to be using 2.7GB minimum at all times. Seems high.
Higher would be more ideal. The Windows mindset of "I'm running out of RAM!" doesn't get you anywhere here; in Android, empty RAM is wasted RAM. My Droid Turbo averages ~1.8gb used of 3gb. Seems Nougat tries to average 60%-70% usage.
When you switch out of an app, it's moved to the background and (usually) suspended, but kept in memory so you can switch back to it quickly. It's things like this that take up memory you think should be "free".
In the event that you need to load up a big app, stuff running in the background is quickly and gracefully unloaded.
Unless you're getting constant foreground app crashes - which might indicate that something is forcefully keeping itself loaded and starving everything else of needed memory - you shouldn't worry about it. Android is fairly good at handling memory these days.
Septfox said:
Higher would be more ideal. The Windows mindset of "I'm running out of RAM!" doesn't get you anywhere here; in Android, empty RAM is wasted RAM. My Droid Turbo averages ~1.8gb used of 3gb. Seems Nougat tries to average 60%-70% usage.
When you switch out of an app, it's moved to the background and (usually) suspended, but kept in memory so you can switch back to it quickly. It's things like this that take up memory you think should be "free".
In the event that you need to load up a big app, stuff running in the background is quickly and gracefully unloaded.
Unless you're getting constant foreground app crashes - which might indicate that something is forcefully keeping itself loaded and starving everything else of needed memory - you shouldn't worry about it. Android is fairly good at handling memory these days.
Click to expand...
Click to collapse
I notice this issue more on custom ROMs than stock firmware. On mine and my wife's Quarks (3GB RAM, as you well know), running Marshmallow and Lollipop versions of the same ROM, something causes the phones to just freeze up for about a minute, crashes, then RAM is released to use. It was happening at least once a day on my phone, then my wife said it was happening to her phone. (Our old phones, not the new LG V30 phones.) I've messed with the LMK settings, trying different combinations, to no avail. And I did report it in the Nougat ROM thread for that phone. (Marshmallow ROM thread no longer has support.)
So, while I totally agree with your answer, it is the technically correct answer, I do understand the OP's concern. I've gotten to the point where I like to see more free RAM, so I know my phone isn't about to freeze up. At least on my old phone.
I love custom ROMs, but the past couple of weeks it's been nice to run stock on my new LG V30 and have a very fluid experience. I've not disabled anything. I saw some others disable stuff and then got lagging. I've not touched a thing and my phone is very smooth.
Could a "theme" downloaded from play store take up a lot of RAM and/or slow things down, too?
This is my first experience with a theme.
coldbeverage said:
Could a "theme" downloaded from play store take up a lot of RAM and/or slow things down, too?
This is my first experience with a theme.
Click to expand...
Click to collapse
Possibly, but probably not. From what I've seen, LG themes seem to skin far less than say, substratum does, and even substratum is pretty lightweight unless you get into transparent themes.
Keep in mind the default theme is itself...well, a theme. You're not really saving anything by staying on it. If you see a skin you like, use it, if you're really worried use one of the LG-provided ones that come with the phone.
ChazzMatt said:
I notice this issue more on custom ROMs than stock firmware. On mine and my wife's Quarks (3GB RAM, as you well know), running Marshmallow and Lollipop versions of the same ROM, something causes the phones to just freeze up for about a minute, crashes, then RAM is released to use. It was happening at least once a day on my phone, then my wife said it was happening to her phone. (Our old phones, not the new LG V30 phones.) I've messed with the LMK settings, trying different combinations, to no avail. And I did report it in the Nougat ROM thread for that phone. (Marshmallow ROM thread no longer has support.)
So, while I totally agree with your answer, it is the technically correct answer, I do understand the OP's concern. I've gotten to the point where I like to see more free RAM, so I know my phone isn't about to freeze up. At least on my old phone.
I love custom ROMs, but the past couple of weeks it's been nice to run stock on my new LG V30 and have a very fluid experience. I've not disabled anything. I saw some others disable stuff and then got lagging. I've not touched a thing and my phone is very smooth.
Click to expand...
Click to collapse
Interesting. It does seem like stock ROMs tend to be more conservative with RAM usage, whereas custom ROMs will have less aggressive minfree settings in order to keep more stuff loaded up. "Unused RAM is wasted RAM", but only up to a certain point; in my experience (Maserati with its ancient kernel as well as Quark) approaching ~100mb of free memory in LP/MM/N can bring things to a crawl, and pushing it can cause a kernel panic :good:
The only issue I've seen in Quark RR has been with the Pixiv app, though, and it does exactly what you said. But...I'm fairly certain the app itself leaks memory, as it only happens after browsing a while and is perfectly fine for another stretch after it OOMs and restarts.
My experience with stock ROMs in the past - Quark included - has been "smooth but lacking in features/customization" --- I've never really understood the complaints that stock is slow and claims that custom is blazing fast in comparison. The OEM has a decided advantage in that they have all the tools they need to compile the ROM properly, with then-current driver and kernel sources and a deep understanding of the hardware...I'd be really surprised to find a stock ROM from the last few years to be slower than custom.
But to be honest, my sample size is pretty small. *shrugs* I stick by what I've said, though, if anything the V30 doesn't use its memory enough; some people have complained about apps popping out of memory sooner than expected. LG is still putting out updates too, if a memory-management problem is found, hopefully they'll get right on fixing it.

Categories

Resources