[Q] How do I find a mem leak? - Motorola Photon 4G

Every morning when I take my photon off the charger the memory has only about 60mb free. I reboot and it goes back to 451 free. I looked at system panel app and there was no one app that had a bunch of used memory. Oh and I just did a full wipe and a brand new mr3 flash last night. Any help would be great.

joetemp75 said:
Every morning when I take my photon off the charger the memory has only about 60mb free. I reboot and it goes back to 451 free. I looked at system panel app and there was no one app that had a bunch of used memory. Oh and I just did a full wipe and a brand new mr3 flash last night. Any help would be great.
Click to expand...
Click to collapse
Android OS does not operate in the same fashion as Windows. Do not look to free RAM as some sort of performance metric, it'll get you nowhere. This is also another reason why Automated Task Killers are horrible.
In essence, Android intentionally pre-loads apps into RAM as it sees fit. Therefore apps will kick in faster when you actually invoke them. If an active app requires more RAM, the OS will manage itself and toss out a different app as needed.
http://geekfor.me/faq/you-shouldnt-be-using-a-task-killer-with-android/
http://developer.android.com/guide/topics/fundamentals.html

Beknatok said:
Android OS does not operate in the same fashion as Windows. Do not look to free RAM as some sort of performance metric, it'll get you nowhere. This is also another reason why Automated Task Killers are horrible.
In essence, Android intentionally pre-loads apps into RAM as it sees fit. Therefore apps will kick in faster when you actually invoke them. If an active app requires more RAM, the OS will manage itself and toss out a different app as needed.
http://geekfor.me/faq/you-shouldnt-be-using-a-task-killer-with-android/
http://developer.android.com/guide/topics/fundamentals.html
Click to expand...
Click to collapse
Thanks but the problem is that the phone is almost frozen when the memory is gone. when I reboot it the speed is back so maybe it is a different problem

joetemp75 said:
Thanks but the problem is that the phone is almost frozen when the memory is gone. when I reboot it the speed is back so maybe it is a different problem
Click to expand...
Click to collapse
I would suggest focusing your investigation towards CPU consumption & apps that are holding wake-locks then, not necessarily RAM consumption.

Beknatok said:
I would suggest focusing your investigation towards CPU consumption & apps that are holding wake-locks then, not necessarily RAM consumption.
Click to expand...
Click to collapse
Yea that's the thing when I look at system panel the country is low and spare parts doesn't work till I root. Is there any other applications that will show me wake locks?
Sent from my MB855 using XDA Premium App

https://market.android.com/details?id=nextapp.systempanel.r1&hl=en
Monitoring is your friend.

The question - How do you find a memory leak may not be the question that you are looking for.
Beknatok - answered the question correctly to what you were searching for.
There are services that start up on loading or different "Intents". These are actions that cause applications to be involved.
For example, with low storage - IMDB loads. I have no clue why, but the intent is for Low Storage condition run whatever subscribes to that intent.
If you are looking to try to find a memory leak you may have to revert to the debugger -
Try this:
Install Android SDK
Then read the link below
http://developer.android.com/guide/developing/debugging/ddms.html

Related

Best task killer..

Can anyone suggesr me which is the best task killer available in the market..m using task killer from rhythm software..
Sent from my X10i using XDA App
gupta.anurag08 said:
Can anyone suggesr me which is the best task killer available in the market..m using task killer from rhythm software..
Sent from my X10i using XDA App
Click to expand...
Click to collapse
I'm running on the Advanced Task Killer, I do not have any issues with them. What's your problem?
I tried 2 3 task killers and all were showing different 'available memory'
Sent from my X10i using XDA App
Yeah, ATK is the best task killer app I've been using
gupta.anurag08 said:
I tried 2 3 task killers and all were showing different 'available memory'
Sent from my X10i using XDA App
Click to expand...
Click to collapse
It is because different task killer have different security policy, which allow them to show the system apps or not. So, in the lower security policy, you can see more running apps and gain more memory after kill them
i do have a question. why are you using a task killer?
I'm not having a dig at people that use them, but more trying to educate people that they are not required
"free memory" is not indicative of a healthy system in linux based machines.
please remember the way in which linux based OS's (which Android is) handles memory. Basically, if you have a heap of free memory it is simply wasted, the OS is not running any more efficiently. It is actually slower.
Here is a quick overview. Written for the desktop computer perspective, but translates over to a mobile phone OS quite well.
"Traditional Unix tools like 'top' often report a surprisingly small amount of free memory after a system has been running for a while. For instance, after about 3 hours of uptime, the machine I'm writing this on reports under 60 MB of free memory, even though I have 512 MB of RAM on the system. Where does it all go?
The biggest place it's being used is in the disk cache, which is currently over 290 MB. This is reported by top as "cached". Cached memory is essentially free, in that it can be replaced quickly if a running (or newly starting) program needs the memory.
The reason Linux uses so much memory for disk cache is because the RAM is wasted if it isn't used. Keeping the cache means that if something needs the same data again, there's a good chance it will still be in the cache in memory. Fetching the information from there is around 1,000 times quicker than getting it from the hard disk. If it's not found in the cache, the hard disk needs to be read anyway, but in that case nothing has been lost in time."
Read more here - http://www.linuxhowtos.org/System/Linux Memory Management.htm
So u mean to say that we shud not use task killers?
Wat if i exit a game in btw then wat happens..will it get automatically killed??
Sent from my X10i using XDA App
gupta.anurag08 said:
So u mean to say that we shud not use task killers?
Wat if i exit a game in btw then wat happens..will it get automatically killed??
Sent from my X10i using XDA App
Click to expand...
Click to collapse
Nope, that is the reason why i have to use task killer
For me, it help me save much of battery
Since I stopped using a task killer my battery is better.
Don't use a task killer for a week and watch the difference.
gupta.anurag08 said:
So u mean to say that we shud not use task killers?
Wat if i exit a game in btw then wat happens..will it get automatically killed??
Sent from my X10i using XDA App
Click to expand...
Click to collapse
yes and yes!
if your phone requires the resources, it will kill tasks that are no longer required. its all automatic. let it do it itself and you will have a much happier phone
AND better battery life, because the android OS is not continually restarting processes that your task killer deems unnecessary. I would trust the actual OS over a 3rd party app. It is designed that way for a reason (see my previous post).
mrtim123 said:
i do have a question. why are you using a task killer?
I'm not having a dig at people that use them, but more trying to educate people that they are not required
"free memory" is not indicative of a healthy system in linux based machines.
please remember the way in which linux based OS's (which Android is) handles memory. Basically, if you have a heap of free memory it is simply wasted, the OS is not running any more efficiently. It is actually slower.
Here is a quick overview. Written for the desktop computer perspective, but translates over to a mobile phone OS quite well.
"Traditional Unix tools like 'top' often report a surprisingly small amount of free memory after a system has been running for a while. For instance, after about 3 hours of uptime, the machine I'm writing this on reports under 60 MB of free memory, even though I have 512 MB of RAM on the system. Where does it all go?
The biggest place it's being used is in the disk cache, which is currently over 290 MB. This is reported by top as "cached". Cached memory is essentially free, in that it can be replaced quickly if a running (or newly starting) program needs the memory.
The reason Linux uses so much memory for disk cache is because the RAM is wasted if it isn't used. Keeping the cache means that if something needs the same data again, there's a good chance it will still be in the cache in memory. Fetching the information from there is around 1,000 times quicker than getting it from the hard disk. If it's not found in the cache, the hard disk needs to be read anyway, but in that case nothing has been lost in time."
Read more here - http://www.linuxhowtos.org/System/Linux Memory Management.htm
Click to expand...
Click to collapse
The idea is absolutely right if memory is being used for apps you are likely to open frequently. ATK allows you to unselect the apps you want to keep running. That way you can unselect the ones you use the most and then use the widget to kill everything else.
I notice when I press the home screen many apps don't kill them selfs and after a while I have loads of apps running and the system starts to lag, specially when I try to run something else.
There are advantages in both approaches and I find a mixed combination (available with ATK) makes it best, although the user need to use some common sense to do it right. Killing everything means the system will be more responsive but regularly used apps will take longer to start up. Not killing means the apps you use a lot "startup" faster when you use them repeatedly (as in fact they never stop running) but after a bit the system will lag when using other apps and may need to use pagefile/swap to atone for the lack of free RAM. That causes page faults which make the system even slower.
The iphone developers aren't complete idiots for killing every app. They have a priority for system responsiveness and they did achieve it at the cost of background running apps. I like the possibility to choose what I want to keep running and kill the apps I'm not likely to use again and it's one of the reasons I picked android.
A little Offtopic to both ifanboys and ihaters:
I never owned any apple product as I think of them as over priced. That said I think the iphone has great merit and I doubt very much we would have Android if the iphone didn't pave the way. Besides I jailbreak my brother's 3G and made it multitask enabled. Now it runs apps in background and there is little diference between it and my android. Except for the extra 200€ it cost, the lower hardware specs and expensive service provider contract my brother pays for a mandatory 24 months, while my X10 cost ~65% initially and came free of any contract.
well said, PCO
pco.vaz said:
I notice when I press the home screen many apps don't kill them selfs and after a while I have loads of apps running and the system starts to lag, specially when I try to run something else.
Click to expand...
Click to collapse
Thats what I and others have found, which is why some people choose to use one, myself included. Someone posted a link to an article last week with similar information posted here about the OS handling itself, but the comments section of the article were full of comments similar to what pco and myself have said, so it's all down to personal preference whether or not you choose to use one.
I did use a task killer for a while, then stopped. Personally my phone is better without. I have nothing except weather that updates automatically, I do it manually when I need it.
It is one of those things, just like on a laptop, everyone has different configurations and usage patterns that results will vary.
Sent from my X10i using XDA App
Don't apps exit when you keep hitting the back button? And for games doesn't hitting exit shut down the app?
I thought its a feature that apps don't close when you hit the home button?
gavriel18 said:
Don't apps exit when you keep hitting the back button? And for games doesn't hitting exit shut down the app?
I thought its a feature that apps don't close when you hit the home button?
Click to expand...
Click to collapse
The browser for instance doesn't. Same with many other. I think it's up to each individual developer to program that behavior for his app.
I got Visual task switcher and I notice lots of apps just stay running forever.
Task killer caused probs for me. A daily switch off doesnt hurt, but have run mine for 7 days and been ok. Even a bberry cant do that!
Sent from my X10i using XDA App
Guys, don't use home button to exit apps.
Will just send them in background.
Use the back button... this won't exit (most of) the apps but will put them in a "sleep" state so, next time when you will use it, it will load faster.
So, again, home button will put the app in background, still running.
Test it with an audio player for ex.
Or a browser... send it in background with home button and the player will still play or the browser will still have that page loaded.
With back button, after all views are "closed" the app will close too (well, put in sleep state).
I use ATK only to kill the apps i use once in a while ... the rest of the stuff, is always in memory.
My X10 has usually about 25Mb free
Actually I used ATK to kill application that need to connect to internet, and in my case there is extra charge payment. But after i used ATK I don't notice that the battery live is longer. So I ever ask someone in my thread about after ATK kill applications and so forth....
And somebody told me to quit using ATK and now I realize that the battery last longer than before.
But one thing still bother me is:
Setting - Wireless control - mobile network - mms & data (no checklist)
means: I can not access internet and receive or send mms either.
Actually I only need MMS, not internet.
May be somebody can help me solve this problem.
Thanks.
But my conclusion:
NO NEED ADVANCE TASK KILLER.
After I uninstall ATK, my phone still running smooth and the battery last longer.
May be we just need best Cache cleaner. But I still trying some of that.
@pco.vaz
I don't want to be mean, but you are wrong.
Even those iOS versions that are not multitasking enabled keep apps in memory. Leaving an app on an iPhone resets its UI state and halts its processes, but parts of the app are left in the memory. You can see the difference in loading speed if you decide to reopen it.
There were apps that could show memory usage and clean it on the App Store, but Apple removed them. You can still get them through Cydia and see for yourself how memory management on iTouch devices actually works. Basically the iPhone goes as low as 3-4 megs of free memory and handles it in smiliar way as Android.
On both Android and iOS, apps that are in background are paused after a while and do not use processor cycles. Memory they keep occupying is overwritten if needed by another process.
I do not recommend using task killer to people who do not know what they are doing exactly. Killing even simple processes often causes phone instability and drains battery faster, as others have already said.
If you feel your phone is stalled, perform a simple reboot. There are apps that run in background (in most cases you are warned about this) or are poorly coded that could cause this behavior. Other than that, inbuilt application manager is able to force close apps pretty well, if you need to kill a single app causing problems

Is Autokiller Memory Optimizer still relevent?

Is Autokiller Memory Optimizer still relevent? I first learned of it in KaosFroyo v36? I think?
I realize it is not a "killer" the same way most task killers are, and it just adjust the limits of the actual systems ram limits. I am familiar with the way linux handles memory but with newer roms and newer versions of cyanogen coming has anyone noticed a difference with or without it? I will freeze it tonight and see if I notice anything.
I quit using it when I switched to Gingerbread. Don't need it. With Froyo I felt it was necessary.
Sent from my GSBv1.9 ERIS using XDA Premium App
I still use it. Why? Because even with gingerbread there's an obvious difference in available memory with and without it. My memory improves on average 20mb with it vs without it (just random checking it). now I realize that can hurt or help (having something already running in the background serves its purpose for quick access. too much stuff running you used and are NOT going to access anytime soon hurts). overall I havent noticed it hurting performance/speed at all and I'd rather have the free space available for operating apps so I use it. less things running even in background should at least theorically help battery life a little. I dont think its NEEDED by any means but the way I bang app after app it works for me.
I still use it because I've used it since KaosFroyo, and so on the move to GSB I couldn't help but continue to use it. Sometimes it really does help, and sometimes it doesn't make a difference.
I've uninstalled it two days ago. Haven't noticed a difference at all. I've been using GingerTazz12. cm7/2.3 has better built in memory management?
winchendonsprings said:
I've uninstalled it two days ago. Haven't noticed a difference at all. I've been using GingerTazz12. cm7/2.3 has better built in memory management?
Click to expand...
Click to collapse
2.2 definitely has better mem management over 2.1, and 2.3 has even better over 2.2.
Memory Managers are a placebo to me. Why not just let your phone manage things on its own? It's not based on Windows where RAM is key in performance, it just simply knocks out the things you haven't used in a while to give it more room for the next program.
It will really effect your "multitasking" ie switching between apps, because there will be memory left over, just not for the app you just finished using
willwgp said:
Memory Managers are a placebo to me. Why not just let your phone manage things on its own? It's not based on Windows where RAM is key in performance, it just simply knocks out the things you haven't used in a while to give it more room for the next program.
Click to expand...
Click to collapse
The thing is, some of those background apps still running could be poorly optimized and still take CPU and not just RAM. You could be using an app and be good on memory, but you could have some background app taking resources and CPU cycles and possibly slowing your phone down in that manner, as well as draining your battery a bit more than usual.
i havent used it at all and im running gtood gsb2.0
I haven't used any memory optimizer/task killer since the first time I tried xtrSENSE, probably last July. zach.xtr includes scripts for GScript to change Android's built in memory manager settings, although I've since stopped changing any ROMs defaults as far as that's concerned.
I decided to not install any mem managers, autokiller & startup auditor, when I moved to GSB from xtrROM. At this point I feel I don't need autokiller at all. Startup Auditor maybe, but the few that do startup on their own are not causing issues. To me AK has become an option, NOT a necessity!
Sent from my ERIS GSBv2.1 using XDA App

Ram optimizers???

Hey...not sure if this has been answered before or not but im trying to figure out battery draining issues and one of things ive always used is ram optimizers...I have Android Booster and Android Assisant ....and then i also use the built in task manager to clear memory...shouldbi be using these apps or are they draining the battery by running in the background? They seem to clean up a nice amount of memory....and keep my phone running fast....just dont know much about them...
Sent from my GT-I9100M using xda premium
I do not think that by cleaning your RAM, you can reduce power consumption by RAM.
Actually, you do increase it. Android itself closes unnecessary applications when needed to clear memory. But, when you clean memory, either by task manager, or some custom tools, you are basically forcing applications to close and restart unnecessarily. I would say, it is additional load on CPU, and thus on battery.
For most applications, exactly startup and finish times are most expensive in terms of CPU load and battery. And most well-designed applications will not drain your battery when paused.
Reminds me of RAM cleaner programs for Windows machines, that would simply trigger excessive page faults.
while i agree with most of what you posted, there are 2 major flaws in your logic:
1. you talk about closing apps that restart on their own, but not many apps actually do that. sure, widgets, services, your launcher, communication apps and syncing apps need to run in the background, but certainly there are other apps eating away the battery, that need to be fully closed, when not needed. kies air or wifi file explorer come to mind. some of those apps don't fully close through the back button and must be killed from a task manager to save battery.
2. you say apps are paused. that is not necessarily true. many apps are capable of fully running in the background, after all, we are talking android and not iOS. we have full multitasking and apps are not generally suspended. say, you want to play a game for the first time and it needs to download more data. you can do whatever you want with your phone, open a dozen other apps, browse and listen to music, that download will continue in the background. this might fill up the ram over time, if you never close an app or apps do not allow direct closing.
there is a reason why samsung supplied the phone with a built-in task manager.
some apps are not well made and don't quit properly and need to be killed that way and killing off unnecessary apps (that won't restart) makes sense.
and let's not forget apps that get stuck but don't force close. they need to be killed as well. what else are you gonna do? restart the phone? certainly that wastes way more power than a restart of a few services.
every time you have a look at the samsung task manager or the "running" panel of "manage applications" and you use 500 something MB of ram and kill all apps, it will go down to something like 200 something, then the services restart and you are back up to maybe close to 300 (all numbers vary on your rom and apps). given that situation permanently saving 40% of ram is certainly a good reason to kill apps before you put the phone in your pocket.
I guess, then, it is best practice to kill all apps from task manager, a few times a day, especially after using several different applications and closing them. Applications that are needed will be restarted automatically.
I am not sure about running so called "RAM optimizers" constantly, though. When you are using your phone, it simply introduces more lags. Otherwise, it does nothing, if you have cleared RAM after heavy usage.
mirbeksm said:
I guess, then, it is best practice to kill all apps from task manager, a few times a day, especially after using several different applications and closing them. Applications that are needed will be restarted automatically.
I am not sure about running so called "RAM optimizers" constantly, though. When you are using your phone, it simply introduces more lags. Otherwise, it does nothing, if you have cleared RAM after heavy usage.
Click to expand...
Click to collapse
killing itself is not necessary in the 1st part.
the more the memory android uses the better the apps behave, thats how android is desinged.
if you people still want to release some memory just use the samsung task manager ot clear memory or "fast reboot" from market.
Thx for the posts...i deleted the 2 android apps for now to see if theres a difference...i will trybusing just the built in task manager for a few days and see how that goes. But for example i mainly use my phone for words with friends...facebook...twitter and instagram....when i run the built in task manager it frees up mabye 200mb of ram....then i would run android booster which would clean up another 200mb and would close stuff like facebook...and tweetcaster and so on....the built in task manager doesnt seem to pick up on and close everything it should...which is why i downloaded the others...my phone has 800+ mb available and i usually find that ots using 500 of those 800 at all times...i wouldbfind myself constantly closing stuff with the optimizers...but like you said...they just open up in the background again anyway. Im rooted and have got rid of all the safe stuff to get rid of and the funny thing is i still dont see much of a difference in ram consumption...i think of ram as important cause it keeps things running smooth with no lag...not sure what to do i guess...ill try it like this without the optimizers and see how things go and download them again if i get bad lag...what i really need is a actual list of my phones internal software so i can get rid of the rest of the unneeded system files...ive found similar lists..but never a list of my actual phone...theres certain stuff running on my phone that isnt in the lists ive found so i left them with the worry that i may have to reinstall the rom if i delete the wrong thing...im also a android noob...only 2 months of using it so far so ive got tons more learning to do...thx for the opinions tho...keep em coming if you got em!
Sent from my GT-I9100M using xda premium

Insanely slow HC browsing experience...

You know, I really really really want to like HC on my View. I love the full pen support. I don't even mind the weird softbuttons and statusbar design that makes little sense.
But the DEAL KILLER for me is browsing. I mean, it is just nuts. I have a super fast wifi connection and I'm getting excellent signal but pages take FOREVER to load. I mean, like 10 seconds even for the most basic HTML page.
Why Android, why? What the hell did you do to HC that completely broke the browsing experience compared to GB and why didn't you ever fix it?
HC on the View = TRIPLE FACEPALM UTTER AND COMPLETE FAIL.
Mine is fine. By the way, 10 seconds?
j510 said:
Mine is fine. By the way, 10 seconds?
Click to expand...
Click to collapse
Yeah it's crazy. Ever since I flashed back to HC browsing takes for-e-ver to load.
Mine gets like that when i have to much apps open, download a task manager and kill the apps you not using, the more RAM you got free, the smoother it will be.
Gotta love it when folks post things as if every user is having the same problem when it's clear that's not the case. I think we discussed this before, but frankly if you have so much stuff active that you have to kill apps with a 3rd task killer to get your browser to work you have bigger issues.
The built-in memory management and task killer takes care of that very well unless you have badly misbehaving apps or other abnormal problems. If everything is normal in HC or even the older GB, there should always be approx 80% of RAM used. That's normal and if you kill things, android will just fill RAM to 80% again, over and over because that's how it's memory manager works and for good reasons.
And the browser in HC works just fine if you or bad apps don't screw the system up. Do makes sure you have some free space in flash for the browser cache and clear the cache occasionally.
Try rebooting your tab
DigitalMD said:
Gotta love it when folks post things as if every user is having the same problem when it's clear that's not the case. I think we discussed this before, but frankly if you have so much stuff active that you have to kill apps with a 3rd task killer to get your browser to work you have bigger issues.
The built-in memory management and task killer takes care of that very well unless you have badly misbehaving apps or other abnormal problems. If everything is normal in HC or even the older GB, there should always be approx 80% of RAM used. That's normal and if you kill things, android will just fill RAM to 80% again, over and over because that's how it's memory manager works and for good reasons.
And the browser in HC works just fine if you or bad apps don't screw the system up. Do makes sure you have some free space in flash for the browser cache and clear the cache occasionally.
Click to expand...
Click to collapse
Its true that there are always certain apps open, however if you open other apps and exit, they stay open. For instance my news app takes about 100 - 200 MB of ram when its open, if i exit, it stays open and occupies that amount, kill it. its EXTRA apps that you kill.
Just because you have a certain experience, doesn't mean it applies to everyone else.
Havoc-X said:
Its true that there are always certain apps open, however if you open other apps and exit, they stay open. For instance my news app takes about 100 - 200 MB of ram when its open, if i exit, it stays open and occupies that amount, kill it. its EXTRA apps that you kill.
Just because you have a certain experience, doesn't mean it applies to everyone else.
Click to expand...
Click to collapse
I understand where you are coming from but the Theory behind DigitalMD's post is SPOT ON, the taskiller and builtin memory management within linux should not cause you any problems, also if a single app is taking up 100 - 200 mb of RAM there is something seriously wrong. What ROM are you using and if you can, please post a link to the ROM. I will try and help you out, i do not have a view but hopefully i can fix this

Ram

Is this a Motorola thing? Looking at my app I got, has approx. 400mb of tam, with at least 200mb full no matter what. Is this because of the locked bootloader?
Sent from my Motocrap Droid X2 w/ Eclipse 2.2.1
it's an android thing,
In Android, processes and Applications are two different things. An app can stay "running" in the background without any processes eating up your phone's resources. Android keeps the app in its memory so it launches more quickly and returns to its prior state. When your phone runs out of memory, Android will automatically start killing tasks on its own, starting with ones that you haven't used in awhile...
Click to expand...
Click to collapse
http://lifehacker.com/5650894/android-task-killers-explained-what-they-do-and-why-you-shouldnt-use-them
I think the V6 mod can modify that. Don't quote me, but I have noticed much better memory management after supercharging.

Categories

Resources