How to track apps using CPU/RAM usage - General Questions and Answers

Hello!
I'm sure this has been asked a million and one times but my searching only brings up results if I was the developer of an app. Guess my google skills aren't that great.
I have a Pixel 2 XL running stock android 11.X what ever we are up to now. For a while I have been having the phone running quite slow at times, laggy animations and freezes. Its not completely unusable, but what's throwing me off, is about 75% of the time it is like this, but the other 25% it runs smooth and quick, no lag at all, using the same apps I normally use. I can't figure out what is causing the lag the other 75% of the time, or what's different when it is running fast. Sometimes it takes up to a minute for Android Auto to load up when its lagging.
So what I'm asking is, are there any apps, root or non root, that I can use to more specifically see what apps are using CPU cycles or high memory usage? The battery usage in settings is only showing expected usage from my apps, so its not really helping.
Thanks in advance for your suggestions.

i'm looking into it too. so far, found none

Related

Sure fire way to stop background programs from running?

I'm attempting to try to increase my battery life so it lasts longer than 12 hours (~13 seems to be my limit). (I'll admit I'm a bit jealous of those who can run the phone 24+ hours) Though it's somewhat painful, I'm shutting down most the programs I have running in the background. However there seems to be a number that like to restart even after I think I've disabled their startup, widgets, notifications, etc.
Is there a way to make sure programs that you install don't run? Or at least don't launch during start up? Perhaps something like msconfig in windows?
Thanks.
Raleran said:
I'm attempting to try to increase my battery life so it lasts longer than 12 hours (~13 seems to be my limit). (I'll admit I'm a bit jealous of those who can run the phone 24+ hours) Though it's somewhat painful, I'm shutting down most the programs I have running in the background. However there seems to be a number that like to restart even after I think I've disabled their startup, widgets, notifications, etc.
Is there a way to make sure programs that you install don't run? Or at least don't launch during start up? Perhaps something like msconfig in windows?
Thanks.
Click to expand...
Click to collapse
Killing background tasks will only decrease your battery life. When an application goes to the background, it sits in memory but does NOT consume any CPU power. since the memory is in solid state, it requires no power to stay in that state. By constantly killing background applications, it will need to start up, reinitialize, and consume more power then if you had just left it alone. Also, long term performance will be negatively affected, even if you do expereince a small short term performance gain. the Android OS is designed at the core level to have applications behave this way, and modifying that behavior will make for a worse experience.
asrrin29 said:
Killing background tasks will only decrease your battery life. When an application goes to the background, it sits in memory but does NOT consume any CPU power. since the memory is in solid state, it requires no power to stay in that state. By constantly killing background applications, it will need to start up, reinitialize, and consume more power then if you had just left it alone. Also, long term performance will be negatively affected, even if you do expereince a small short term performance gain. the Android OS is designed at the core level to have applications behave this way, and modifying that behavior will make for a worse experience.
Click to expand...
Click to collapse
Eh, this is the first I've heard this. I don't remember reading this in the various battery optimization guides.
Still is there a was to stop things short of uninstalling? For example, I want to stop using the Yahoo Mail app but don't want to install yet. I went through all the options I could to disable checking/notifications, etc but it still pops back into memory constantly.
I assume youve tried the obvious, turn off WiFi (3G) and screen when not actively using it?! Those are the big batt.-eaters
Sent from my HTC Magic using XDA App
asrrin29 said:
Killing background tasks will only decrease your battery life. When an application goes to the background, it sits in memory but does NOT consume any CPU power. since the memory is in solid state, it requires no power to stay in that state. By constantly killing background applications, it will need to start up, reinitialize, and consume more power then if you had just left it alone. Also, long term performance will be negatively affected, even if you do expereince a small short term performance gain. the Android OS is designed at the core level to have applications behave this way, and modifying that behavior will make for a worse experience.
Click to expand...
Click to collapse
Documentation? As far as I have read an application does not go into any type of dehydrated state when running in the background / minimized. It can do anything it wants including using CPU cycles.
I do agree that most applications do not need to be killed with a task killer but leaving 3D games (for example) running in the background could hurt your battery. Also not all applications are progammed with ther same fore thought and skill level.
I get about 33% more runtime out of my battery using a task killer to kill specific applications that I know I do not want running in the background.
Streaker said:
I assume youve tried the obvious, turn off WiFi (3G) and screen when not actively using it?! Those are the big batt.-eaters
Click to expand...
Click to collapse
I leave wifi on since I'm usually in range. It's more efficient than 3g right? I alway sleep the device when I'm done. I still have huge percentages on the screen when looking at the battery usage. I'm trying a completely black screen now.
Mainly your widgets and icons and stuff still cover large portions of it, so: a black screen will help, not but alot.
Also, to keep items in RAM, to the second poster... What do you think is keeping those items in RAM?
Ummm... It's the CPU.
Task Killers won't help you on RAM usage at all (Because Android will automatically shuffle them out if it has to, or so I've read... I've yet to hit max memory). Task Killers DO help you as far as battery use goes, though... Keeping the browser killed if you aren't using it, etc.
Bjd223 said:
Documentation? As far as I have read an application does not go into any type of dehydrated state when running in the background / minimized. It can do anything it wants including using CPU cycles.
I do agree that most applications do not need to be killed with a task killer but leaving 3D games (for example) running in the background could hurt your battery. Also not all applications are progammed with ther same fore thought and skill level.
I get about 33% more runtime out of my battery using a task killer to kill specific applications that I know I do not want running in the background.
Click to expand...
Click to collapse
I should clarify. I guess the term I meant to use is "suspended." If a program is actively "running" in the background, it will use CPU cycles. But if you simply stopped using a program, say for example the xda app, and returned to your homescreen, the application stays "suspended" in the background and consumes no CPU cycles until you go back to it. Now services that are updating, such as email or SMS, will use CPU cycles in the background because they are still actively running. But if you want to conserve battery life you can simply disable the notifications from most of these programs.
asrrin29 said:
I should clarify. I guess the term I meant to use is "suspended." If a program is actively "running" in the background, it will use CPU cycles. But if you simply stopped using a program, say for example the xda app, and returned to your homescreen, the application stays "suspended" in the background and consumes no CPU cycles until you go back to it. Now services that are updating, such as email or SMS, will use CPU cycles in the background because they are still actively running. But if you want to conserve battery life you can simply disable the notifications from most of these programs.
Click to expand...
Click to collapse
The app itself at that point may not be but the Android OS still does to maintain that suspended state.
I have some applications I rarely use or even some that I've never used but may want to in the future. I see absolutely no benefit in keeping these applications in the background. Further more, I've noticed a signficant drain on the battery when extra applications are running in the background. I'm sure it's not all of them, but I've yet to discover who exactly the culpit is. Right now I suspect it's the NPR app, perhaps due to data use?
The point is, there are perfectly good reasons to keep some apps in the background, and perfectly good reasons to kill others - or perferrably not have them start up at all unless I do it myself. Could be due to data usage (especially if you do not have unlimited data), could be due to concerns about excessive cpu usage. There really should be a clear method in which you can stop applications from opening on their own.
You can use the program "Autostarts" to keep applications from starting at startup. With it you can also prevent things from launching under a number of other situations. That might be what you are looking for. Just do a google search for the APK as I don't think it is in the market.
Sent from my SAMSUNG-SGH-I897 using XDA App
Shuggins said:
You can use the program "Autostarts" to keep applications from starting at startup. With it you can also prevent things from launching under a number of other situations. That might be what you are looking for. Just do a google search for the APK as I don't think it is in the market.
Wouldn't tasker also help?
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Sent from my AOSP on XDANDROID MSM using XDA App
To me, it's not a matter of "task killer or not", but rather when and where to use one. And I think it's simple: Don't bother, unless you suspect a specific app is doing something you don't want it to do in the background. Then, just kill that specific app and leave everything else alone. A Task manager that shows CPU% for each process can be handy for this as well.
I generally try to avoid killing tasks, but one night I had 50% battery on my phone and after about 2 hours or so I took it out of my pocket to make a phone call, and it was very hot and had about 12% of batter left -- something was running wild that shouldn't have been (I think it was Pandora, even though it was not currently playing any music!) So, background apps do occasionally run out of control, and you do need to occasionally kill them, but do it on an "as needed" basis.
Raleran said:
I'm attempting to try to increase my battery life so it lasts longer than 12 hours (~13 seems to be my limit). (I'll admit I'm a bit jealous of those who can run the phone 24+ hours) Though it's somewhat painful, I'm shutting down most the programs I have running in the background.
Click to expand...
Click to collapse
Unless the background process is syncing data, it won't eat your battery. So instead of wasting your time, you should focus on other energy hogs. Things like screen brightness, bluetooth, wifi, and gps.
Shuggins said:
You can use the program "Autostarts" to keep applications from starting at startup. With it you can also prevent things from launching under a number of other situations. That might be what you are looking for. Just do a google search for the APK as I don't think it is in the market.
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
I installed Advanced Task Killer from the Market. It lets you kill all running applications including itself.
durrence
jsmith8858 said:
To me, it's not a matter of "task killer or not", but rather when and where to use one. And I think it's simple: Don't bother, unless you suspect a specific app is doing something you don't want it to do in the background. Then, just kill that specific app and leave everything else alone. A Task manager that shows CPU% for each process can be handy for this as well.
I generally try to avoid killing tasks, but one night I had 50% battery on my phone and after about 2 hours or so I took it out of my pocket to make a phone call, and it was very hot and had about 12% of batter left -- something was running wild that shouldn't have been (I think it was Pandora, even though it was not currently playing any music!) So, background apps do occasionally run out of control, and you do need to occasionally kill them, but do it on an "as needed" basis.
Click to expand...
Click to collapse
Or an auto-killer would've killed it before it killed your battery by 38% lol
Task Killings are bad, mmmkay...
Slightly off topic:
To help conserve battery power,
Use an all black desktop background since the black areas dont use battery power.
Hmm, people in this thread have said a few things that I haven't heard or seen much before. Specifically that killing apps could decrease battery life. When I first downloaded advanced task killer I tended to kill most things. I slowly backed off and now I've been watching what launches and what tends to come back and not kill those (mail apps, widgets, performance watchers, etc). The second is that not having a black background doesn't necessarily improve battery life. Makes sense considering I have icons everywhere on my screen.
@Shuggins - Thank you! That's exactly what I was looking for. I've downloaded it but now I have to, er charge my battery a bit before I can take a close look at it.
@jsmith8858 - Are you running setCPU? A couple days ago I noticed my battery running pretty hot. I stopped using setCPU and the battery cooled down a lot. I've used setCPU since them without the heat issue so I'm not sure what was going on.
Well during todays iteration I ran for about 12 hours (typical). I had a couple short phone calls, 2 email accounts syncing as well as other bg syncing processes. I did eat up 30% in an hour messing with a game. I'd probably have 13-14 hours if I didn't play anything (but if I didn't what's the point of the phone . Still, as much as I love it the screen is killing me. Guess there's nothing to do about it though (usually brightness is all the way down, turn it off when I'm not using it, using a darker background). I didn't kill any of my background processes today. I'm going to set up that Autostarts program and start auto-killing various programs tomorrow.
You can try using autokiller and art it to extreme, but I don't recommend this
Sent from my HTC Dream using XDA App

Guide to Maximizing Battery Life w/o Disabling Half Your Phones Features

*Disclaimer* This is all from a personal experience and testing/research from a long time android user, what I have discovered over time and has helped me and some friends. This will work whether your rooted OR not. I kept it as basic as I can so everyone can benefit. If you dont like what you read and disagree, or want to add something PM me, Ill change/add and give credit to you. Hopefully, this can grow with the community.
*Rooted Section Will be Added*
*When I charge my battery I usually drain it all the way down or as much as i can (around 20% left) then charge plugged in till green, then power down and charge for another hour or so. Not sure if this matters or not but seems to help me out try it!*
This guide will help you if your rooted or non-rooted, all the apps I talk about I honestly have no ties to the devs. I don't use any SUPER AWESOME AMAZING BATTERY SAVER 5000 apps or anything like that. Those mostly just turn ur radios off and on and kill apps in the background. In my experience a lot of them cause syncing issues with my e-mail and other notifications. I like to receive my information instantly not have an app waiting for me to turn my screen on to check for updates.
About my personal setup: Basically, I want my phone to last me all day but still perform well with a heavy use, WITHOUT needing to constantly change settings to save battery. With what I have here Im able to keep my Sensation running for a full day of moderate-heavy use (7:30am to around 10pm) with its STOCK battery (Did damn well on my Evo 4G too). Days of very minor use Ive gone into the second day with 60% + battery. Yes, I use all my home screens and have a good amount of widgets, I love sense and its widgets. I play games, surf the web, do a lot of texting, listen to a lot of music, decent amount of fbing and email, usually take a few pictures a day. Half my day is wifi/other is mobile data.
Here goes the real basics, mostly common sense here not trying to insult anyone. Feel free to browse thru it quick (green text) if your not totally new to the android scene, whats after it will be a good read for noobs and vets.
*I use the power control widget, make getting to a lot of settings quicker. Why waste battery digging thru menus?*
Basics:
-Screen brightness: (duh ) these pretty screens eat battery brighter=quicker drain naturally and from my experience leaving it on Auto Brightness kills more battery too. Each time your phone pulls information from the sensor to decide on how bright it should adjust itself too.
-GPS: If GPS is on it should not effect battery unless an app is using it and you see the GPS icon on your notification bar. I noticed a very slight increase in mA discharge when i had it enabled, to be safe leave it off if you dont use it extremely frequently.
Location thru mobile networks: Not to hard on battery. I leave mine on it does add drain but it takes away from my weather widgets updating when Im traveling.
-Bluetooth: Moderate battery drain. I honestly don't use it at all myself but if you do try your best to keep it off when not in use.
-Wifi: Android has gotten a lot better at managing wifi over the past few years. It doesn't drain that bad on battery and it shuts off/on periodically on its own when screen is off depending on whats using it.
Google Back-Up: Takes a little juice here and there no biggie. I dont use it just because I like to fresh install my apps when I try a new rom, run into less problems that way.
2G/3G/4G: This varies phone to phone, the slower speed the better battery life. If you know your not going to be using 4G for a while turn it off. I leave mine on 4G or wifi all day with my sensation. When I had Sprint and my Evo I would leave it off most of the time. Depending on your carrier and how their data works this is a big one. T-Mobile seems to handle well, Sprint and Verizon's 4G Ive seen eat an insane amount of battery.
Sync/Background Data: I lumped them together because sync is pretty much reliant on background data. These kill a lot of your battery in general. It syncs your apps (email, facebook, google data, contacts, etc.), the periodic checks your apps do to check for and download new emails and notifications, using background data (data still transmits when screens off). I always leave these on and still manage great battery life, I like things instant if I wanted to wait Id just wait till i got in front of a PC. Sync and Background data are the settings most battery saving apps control because they really can help your battery if you turn it off. You can control what core apps sync in settings>accounts and sync. Or the power widget that 95% of android phones have has it on there. I recommend minimizing the amount of apps you allow background data with, example: WeatherBug first launch it asks if it can automatically update itself in the background for apps were thats not necessary hit no.
Radio/Airplane Mode: Pretty self explanatory, turns off your connection to your wireless provider. No point in ever turning it off in my eyes, your phones no longer a phone.
What has really helped me with my battery life (non-basics):
There is a lot to be said when it comes down to 2.2+ android phones and whether they need a task killer anymore or not. Since Ive had a lot of android phones and a few now that are 2.2+ Ive done a lot of testing. I usually go about a 2 weeks on one idea or new task killer and keep a close eye on battery drainage using Battery Monitor Widget, free app in the market. It tells you exactly how much of your battery is being drained without killing battery itself. Each phone/rom settles at a different average mA lower the better. In my experience if I can keep my phone anywhere under 100mA when idle im doing good. This held true on both the Evo 4G and my Sensation. Some ASOP roms i could get down to the 30's but for sense under 100mA is good. Keep in mind you will get the occasionally spike here and there its just android and/or apps in the background. You can view the a chart of the battery data in Battery Monitor.
Instead of boring you guys with each task killer Ive used and its results, Ill just get down to what I found out in the end.
Basically, the way android 2.2+ works it really isn't necessary to run a task killer it does a decent job removing apps from memory when you need more memory. But at the same time I found running a task killer periodically (BUT not killing frequently used apps) results in a lower average mA drain leading to overall better battery life.
The best application I have used has to go Automatic Task Killer , trust me Ive used a lot from the top free ones to a few of the more popular paid ones. What this task killer does is kill a selection of apps you allow it too every time your phones screen shuts off and goes idle. On Automatic Task Killer's first boot your shown a screen of every application that could at some point run in the background on your phone. This part sucks a little bit but it is worth it, you need to select which of the apps you want to allow it to kill automatically. It does not kill foreground apps the ones you currently have open on the screen aka a browser or a game. Example your playing NFS: Shift and your boss walks by so you quickly pause and hit the power button turning off the screen, next time you turn the screen on it will kill all other allowed background apps but your game will still be up front and center.
Now the trick is to go thru and set it to kill apps you know your phone won't automatically just restart or you don't use 90% of the time. So don't select things like Dialer, Contacts, Clock, Calendar, Messages or apps you constantly use/check such as a third party SMS app or your main E-Mail Client or third party keyboards (various by person and what you use most). Letting the app automatically kill those is just going to lead to worse battery life because your phone will just restart it each time leading to more CPU cycles (not what you want and part of the reason some consider task killers bad things).
Also, when using any task killer and killing the proper apps sense runs smoother, a big deal with sense 3.0.
So hopefully with a little messing around you can get a good setup where your phone lasts you all day without having to constantly keep changing settings and watching your battery life. All while everything stays syncing and instant. Hope this helps!
*ROOT Section (now that we have s-off )
Everything posted above can be done on any rom, rooted or none. There has been a lot of posts on "freezing apps" that you dont need or typically use, which does in fact really help battery life. Since, we (by we i mean sensation users) now have a permanent root this is my tiny second part of the guide for rooted devices.
I dont freeze my apps I prefer them to be gone for good if its something I dont see myself using or its bloat that came with my phone/rom. Since 98% of us will be using custom roms now this usually isnt an issue since most dev's r good at what they do and remove all the bs we dont need or normally use. Still there is some apps we may not want on our phones so for that I use SystemApp Remover . Its a great App for people who dont want to have to worry about going in manually and getting rid of system apps.
Its just basically an Uninstaller that allows you to access any and every app on the phone for you to uninstall (thats y roots needed). For me I just go in an drop the apps I know i wont use. A lot of roms come with carrier add-ons and such, those I normally delete as well as a few HTC sense widgets and apps I see no need for. It will free up space and increase your phones battery life with most things you delete.
Now, be careful. You are prompted upon opening SystemApp Remover that messing in system apps is dangerous and it is. If your not sure what something is DONT touch it, simply do a google search or ask around to see if its safe to remove first.
Re-calibrate Battery: After you flash a new rom or start using a new battery, you should use your recovery (CWM or other) to Wipe Battery Stats. Before you do this make sure your battery is at 100% and has been on the charger for over an hour with the fully charged green led on. This will allow your device to better drain your battery and can really help battery life.
So hopefully with a little messing around you can get a good setup where your phone lasts you all day without having to constantly keep changing settings and watching your battery life. All while everything stays syncing and instant. Hope this helps!
Thanks to people who have contributed:
-JadeSoturi
thanks for sharing the experience
i'm trying Automatic Task Killer
devine might said:
thanks for sharing the experience
i'm trying Automatic Task Killer
Click to expand...
Click to collapse
no problem. let me kno how it goes for you
very good info! would also help if you specify which versions of android.....
Thanks for the info, hope it will increase my battery life to last a day
Airfaire said:
very good info! would also help if you specify which versions of android.....
Click to expand...
Click to collapse
im on my sensation so 2.3.3. Been getting a lot of hate on the sensation forums since task killers are officially deemed no longer needed, but this method really helps me with battery life hoping itd help some of u too
Watchdog> then any task killer
ADR6300
Hmm, ill try auto task killer as well, tried a few others.
I use JuiceDefender, I like it. It manages my connectivity pretty well and it does help.
This is excellent, many thanks. As a converted WM 6.5 user I have to say, I am enjoying android considerably more and I prefer it to the Metro interface of WP7. It's nice to know the little tricks to get the most out of it. Thanks again. ^_^
DarkSwanKnight said:
I use JuiceDefender, I like it. It manages my connectivity pretty well and it does help.
Click to expand...
Click to collapse
same here, JD works pretty good
TastyTorge said:
same here, JD works pretty good
Click to expand...
Click to collapse
Worth getting the full one or will the free version do?
Sent from my HTC HD2 running TyphooN CyanogenMod 7 via XDA Premium App
Thanks
Thanks for the info, and for sharing, i will try the different methods
i havent really bothered with task killers but ive found reducing the brightness and disabling data and sync makes my battery last alot longer. i just re enable when i need them.
also, i downloaded setcpu and added a profile for while the screen is off. that helps alot. the drain is about 5% with the screen off after every 3 or 4 hours.
Very good info thanks
You had me impressed until you mentioned task killers. Absolutely horrible...
Sent from my HTC Sensation 4G
Martin_Toy said:
Worth getting the full one or will the free version do?
Click to expand...
Click to collapse
Full version is much better.
It's killer app indeed. I think many of it's features should be natively included in android.
Options like "Turn off 3G/EDGE when connected to Wi-Fi", "Turn off all radios when screen is off", "Turn off Wi-Fi after x minutes if it doesn't connect to a network", "Set screen brightess to minimal when battery is low", etc....it wouldn't be that hard to implement and battery life, perhaps most criticized aspect of Android, would improve immensely.
fpu
floating_point_unit said:
Full version is much better.
It's killer app indeed. I think many of it's features should be natively included in android.
Options like "Turn off 3G/EDGE when connected to Wi-Fi", "Turn off all radios when screen is off", "Turn off Wi-Fi after x minutes if it doesn't connect to a network", "Set screen brightess to minimal when battery is low", etc....it wouldn't be that hard to implement and battery life, perhaps most criticized aspect of Android, would improve immensely.
fpu
Click to expand...
Click to collapse
Your mobile network DOES turn off when connected to wifi, and if all radios turned off when the screen went off, how would you ever get calls or emails with the phone in your pocket? The wifi after x minutes would be a nice feature, but I don't like things touching my screen brightness.
Thank you for your information.

TweakStock 1.4 & kswapd0 lag - potential solution

I installed @dwitherell's TweakStock 1.4 on my Charge about 5 weeks ago, and I've mostly been happy with it. The one problem I kept running into was deteriorating performance over time, leading to frequent hard lockups requiring hard reboots. I'd gotten to the point where I needed to reboot the phone nearly every day. Having multiple active apps also tended to cause problems, for example Cardiotrainer + Rhapsody music.
Sometimes when the lag hit I was able to get a CPU usage report before the phone fully locked up. At such times I'd see kswapd0 eating a large portion of CPU. That suggested memory problems. I tried tweaking my OOM kill thresholds, to no avail.
This morning, based on some research, I took a look through my build.prop and noticed that this ROM's default VM heap size is a whopping 72MB. That sounded very high, compared to my previous phones where it was 24-32MB. I installed the VM Heap tool, knocked the heap size down to 48MB, and rebooted. My phone has been running as smooth as silk since, even with multiple simultaneously active apps running.
I'll keep watching to see how this holds up over time, but the difference even over a few hours is noticeable enough that I thought I'd report my findings right away. Regrettably, XDA discriminates against new members, so I can't post into the TweakStock developer thread as I would prefer. HTH!
thanks for the tip... just installed Eclipse, at its VM is 48MB.
tweakstock was running great for me though, so real problems like you said. my only problem (minor) was my Scrabble app being such a battery and data hog...
Thanks for the tip -- I had noticed this too, will give it a try. Though I'm on a different version of TweakStock I noticed the heap size is 72 here as well. Trying 48 for a while... will chime in if there's improvement.
- A
It is likely set high because it was found that increasing the VM heap size helped curb hot boots on heavily modified ROMs.
Interesting, thanks for the history @imnuts! I did encounter the hot boot issues some months back on earlier iterations of Gingerbread ROMs for the Charge. I will keep an eye out for hot boots to see if my 48Mb VM heap size is too low, or swap lag if it is still too high. Perhaps we will all have to try to find the best heap size for our usage patterns, as there may be no best one-size-fits-all setting.
Can't remember where, but I think I once read something that said 40 MB is the absolute best size to go with for a variety of reasons. For what that's worth...
Back on tweak stock.... can I just edit the build.prop or do I have to download VM heap?
Thanks!
tappin' that....
jco23 said:
Back on tweak stock.... can I just edit the build.prop or do I have to download VM heap?
Thanks!
tappin' that....
Click to expand...
Click to collapse
Just set the value in the build.prop.
jco23 said:
Back on tweak stock.... can I just edit the build.prop or do I have to download VM heap?
Thanks!
tappin' that....
Click to expand...
Click to collapse
Only change back only when you have issue. I currently using 72m since day one and it's working fine, super fast launching apps.
Fwiw stock settings are 64
Was so thrilled to see this recommendation, as I observed that my phone is really struggling to memory, and then kswapd0 kicks in. Tried to change it to 48MB, then to 64MB. Did not see any improvements. It looks like all apps get pre-loaded into memory, and once free memory hits less than ~80MB, the phone becomes sluggish. Once I kill all apps, the phone is back to normal snappy lag-free operation. Free memory at that point is around 135MB. This is even worse when I insert the phone into car dock. Re-draw takes about 5-7 seconds, swiping is about 2-3 seconds. In few moments it becomes ok, but still laggy.
No problems here
Been on TS1.4 w/ PBJ for about a month now, everything is still as snappy as day one. Thought I was having issues at one point but it turned out it was actually an app, Stitcher Radio, that was eating CPU and draining battery (even though I never launched it). I've over/under clocked with SetCPU at various times but never messed with the voltages.
Nonetheless, thanks to OP for this little tidbit, I'll remember it if I ever start experiencing problems.
ddavv said:
Was so thrilled to see this recommendation, as I observed that my phone is really struggling to memory, and then kswapd0 kicks in. Tried to change it to 48MB, then to 64MB. Did not see any improvements. It looks like all apps get pre-loaded into memory, and once free memory hits less than ~80MB, the phone becomes sluggish. Once I kill all apps, the phone is back to normal snappy lag-free operation. Free memory at that point is around 135MB. This is even worse when I insert the phone into car dock. Re-draw takes about 5-7 seconds, swiping is about 2-3 seconds. In few moments it becomes ok, but still laggy.
Click to expand...
Click to collapse
ddavv, sorry it didn't work for you. Some of the other things I've done to my Charge to help with the lag:
Changed io scheduler to bfq (from sio)
Tweaked my memory manager kill thresholds to 6,8,20,28,32,40 (WIP, YMMV!)
Removed some apps that kept heavy services in memory all the time, e.g. Accuweather & Lookout Security, and streaming media services I didn't use much (Last.fm, Slacker)
Turned off Google location services to stop the k3g_wq CPU runaway bug (this may be fixed in Google Maps > 6.4.0)
Switched to ADW.Launcher
Trimmed widgets I wasn't using frequently (down from 20 to 15)
I still do get a bit of lag after the phone has run for a while, so daily reboots are still a good idea for me - but I'm slowly improving my situation. I'm probably going to take a few hours to do a full wipe & reload once the FP1 ROMs start dropping, and be much more careful about indiscriminate app restoring from Titanium Backup this time. Good luck!

[Q] Nexus S CPU usage and battery life on 4.0.4 ICS

Hi all,
First time poster here, so hello! I've searched the forums and google but could not find an answer to this question.
Is anyone running a Nexus S on 4.0.4 ICS seeing lots of CPU usage at the 1000MHz frequency?
My phone is a Nexus S (i9020)
Operator: 02 UK
OS: Ice Cream Sandwich 4.0.4
Not rooted.
My phone goes into a deep sleep fine and battery usage seems to be little in this state. However, the moment I turn on the screen and start 'using' the phone, I see a battery drop of at least 1% every 5 mins or so. I'm not doing anything taxing, either scrolling through the home screens, or opening browser to read a web page for a few mins.
Higest three battery users are reported as:
Screen 37%
Android System 15%
Browser 7%
CPU Spy reports the following:
1000 MHz - 25.11 (30%)
800 MHz - 7.35 (9%)
400 MHz -3.34 (4%)
200 MHz - 6.26 (7%)
100 MHz - 6.56 (8%)
Deep Sleep - 33.29 (40%)
Total time: 1h23m13s
From what I've read cpu usage shouldn't max out unless you're running something intensive i.e. it shouldn't be at the 1000MHz frequency, when just reading an already loaded page.
I'm able to go from 100% to 50% in about 2 hours, just using the browser (on wifi) to read webpages and nothing more.
When I first got the phone, a year ago, on Gingerbread, I'd be able to watch 1 hour of video, send calls and texts and make it from 8.30am to 5pm using around 40% battery. These days, I don't get close to that at all.
Noted to moderators: if this is posted in the wrong place or would be better suited in an existing thread, I'm sorry please let me know and I'll edit as required!
Thanks in advance for your time and assistance!
Screen drains most the battery. If there is drain while it's off there would be some kind of wake lock preventing sleep. You likely don't have this since it seems your phone sleeps nicely, assuming you had the screen on for moat the time in that screenshot.
The frequencies you show seem a little skewed to 1000mhz for web browsing. What cpu governor are you using, and what settings? I usually get around 40-40 between highest and lowest frequency with ondemand, 20% or less for the intermediate frequencies. This is while web browsing most of the time.
Harbb said:
Screen drains most the battery. If there is drain while it's off there would be some kind of wake lock preventing sleep. You likely don't have this since it seems your phone sleeps nicely, assuming you had the screen on for moat the time in that screenshot.
The frequencies you show seem a little skewed to 1000mhz for web browsing. What cpu governor are you using, and what settings? I usually get around 40-40 between highest and lowest frequency with ondemand, 20% or less for the intermediate frequencies. This is while web browsing most of the time.
Click to expand...
Click to collapse
I understand the screen drains the most battery, but I feel there is an underlying issue since light usage (like reading) can drain 50% in 2 hours, whereas before I could watch 1 hour video and lose about 10%.
I'm not sure what you mean by CPU governor and settings. I'm running the stock ICS 4.0.4 (got the OTA only a few days ago). I agree it seems skewed. It seems to use the 1000MHz frequency pretty much all the time the screen is on.
chillerz said:
I understand the screen drains the most battery, but I feel there is an underlying issue since light usage (like reading) can drain 50% in 2 hours, whereas before I could watch 1 hour video and lose about 10%.
I'm not sure what you mean by CPU governor and settings. I'm running the stock ICS 4.0.4 (got the OTA only a few days ago). I agree it seems skewed. It seems to use the 1000MHz frequency pretty much all the time the screen is on.
Click to expand...
Click to collapse
First off, welcome to XDA!
The fact that you're not rooted + stock could only mean that there is probably a background app running while your actively using your phone. Have you checked into Settings > Apps > Running and noticed anything peculiar? For a fact, based on everything I'm reading here there is no way your phone should be at 1000 MHz for 30% of the time. At most for my usage, my phone is in the 1000 MHz state < 10% of the time.
If all else fails, you could always try doing a factory reset and seeing if the problem persists. If not then you can install your important apps one by one to find a culprit.
You could also try out this nify tool: BetterBatteryStats to give you more statistics as to what is eating your battery.
http://forum.xda-developers.com/showthread.php?t=1179809
10 percent drain while watching a video is hard to believe.
That would equal 10hrs to drain the battery with screen on watching a video. Which is not happening.
Your battery drain now sounds normal. Maybe in the past it was not reporting it correctly or you're simply mistaken somehow.
The average battery should last along the lines of 4 - 5 hours worth of screen on time. Whether this is playing a game or browsing around hasn't made more than that much difference for me. 1% every 5 minutes would give you ~8 hours of screen on time, a feat very few (aLNG, looking at you) have been able to do without an extended battery. Anything more than this is not going to happen while maintaining a cell signal and watching videos. You may have been exaggerating the time on battery in the past.
Go to Settings --> Developer options --> Show CPU usage and tick it. Leave the phone sitting there with the screen on for a bit and let me know what the top CPU users are.
Which settings are the best for battery lfe? I have stock everything.
Harbb said:
The average battery should last along the lines of 4 - 5 hours worth of screen on time. Whether this is playing a game or browsing around hasn't made more than that much difference for me. 1% every 5 minutes would give you ~8 hours of screen on time, a feat very few (aLNG, looking at you) have been able to do without an extended battery. Anything more than this is not going to happen while maintaining a cell signal and watching videos. You may have been exaggerating the time on battery in the past.
Go to Settings --> Developer options --> Show CPU usage and tick it. Leave the phone sitting there with the screen on for a bit and let me know what the top CPU users are.
Click to expand...
Click to collapse
The list of things using the CPU changes quite often, here's the list of the ones that are at the top of the list for a while (I've also attached a screenshot):
system_server
com.android.systemui
surfaceflinger
com.jim2
kworker/u:1
kworker/0:0
dhd_dpc
wpa_supplicant
UPDATE:
7h 48m 34s on battery
Voice calls: 1h 39m (screen is off for most of the call duration)
Screen on: 1h 23m
Used browser and xda app for less than 5 mins each.
Haven't done much else with the phone and I'm on 44% battery (from full charge).
CPU Spy (measuring whilst phone was charging overnight, so deep sleep is high):
Total CPU time = 13h26m
1000 MHz = 40 mins (5%)
800 MHz = 17 mins (2%)
400 MHz = 12 mins (1%)
200 MHz = 26 mins (3%)
100 MHz = 56 mins (7%)
Deep Sleep = 10h52m (80%)
hi,
I can confirm chillerz's notice. My experience's similar. Last week I upgraded my (non routed) i9023 from GB via OTA (before the update I did a hardreset). My phone became a cityphone I always have to keep a charger in my pocket and looking for power connectors.. with GB I could use my phone at least 2 days but now I'm happy if I can survive my workday.. my best was 13h - in that case Android OS battery usage was 61%.. I still haven't try to use the music player.. but I don't see any sense to it.. I'm also interested in a thread which could help me out and I've found my self here.. what do you recommend? what to do? replacing my 7 months old phone?? I've jus loved my nexus and here I'm.. It won't be a good business strategy in long term..
I know about the issues of released ICS in December.. I was hopping the 4.0.4 will solve them.. now it's April.. I don't want to wait 4 more months again..
thanks in advanced for your helping!
I had horrible battery life after the 4.0.4 update, but it's been much improved after fully discharging the battery and then charging it to 100% with the phone powered off.
great news, I will try tonight and share the result!
thx
The latest usage results seem good and processes also seem standard. Phone calls tend to use a fair bit of battery, keeping and transmitting a constant signal, powering speakers, keeping the entire phone awake and so on. I wouldn't put it above the screen being on, so you should be able to squeeze another ~30 minutes before 44% in normal use but this depends on too many factors to list anyway and bad reception can make it all the more difficult to figure out.
Also, while making calls don't be surprised if the CPU does decide it needs to ramp up to a higher frequency (ondemand likes 1000mhz) but i havn't put this to the test. This could skew the results as in the OP.
hello futangclan,
since your solution the battery usage "normalized" 26h/17%. This workaround would be a great tip on a welcome srceen at the first boot of ICS
before the fully discharging battery I noticed the battery usage of Android OS decreased from 60 to 19%.. I'm thinking about whether the ICS does something "maintenance" in the background after the OTA upgrade the first days or not..
Once upon a time, I too was one of the sullied - one those unfortunates souls, plagued with poor battery life on a Nexus S (stock FTW), brought on by an innocent (and joyful) upgrade to ICS 4.0.4 from 2.3.6.
When I first discovered the trouble, with great gusto, I ran to the interwebs and dutifully followed suggestions of restarting the phone or draining the battery, but alas - it was all to no avail. There is, however, a happy ending to this story. With effort and perseverance, I've since significantly improved performance. Here is my brief tale of success.
After the upgrade, Android (praise be its name!) decided to start, in the background, every single application on the phone. Verily Snake '97 was indeed running all the time. The horror!!! The game is entertaining certainly, but hardly worth keeping alive at the cost of other, more critical apps.
I was not deterred and took matters into my own hands. Using Manage Apps -> All (not Manage Apps -> Running, mind you), I went about Force Stopping each application (including some Android core apps). It was tedious and frightening. I was very careful and hesitant, as you should be if you are affected by a similar malady.
By the next day, I saw much improved battery life (hooray!), yet I wasn't free and clear. The hold of evil had not been loosened completely.
I found within, a strange and dangerous lock (wakelock - was that its name?) keeping the Gallery in the list of active applications, even when I had not used it for some time. It refused to move to the cached apps list. Puzzled, I scratched my empty head. The interwebs were of no use this time - I was on my own.
(cue ominous music)
Peering within, in the Sync section I found the system was trying to sync photos on an account where the checkbox for syncing was not selected.
A quick off-on-off stopped the syncing. The app slinked off the Running apps list. Soon, I was overjoyed, for I was experiencing improved battery life!
I've now returned to performance much closer to that from days of 2.3.6. My Nexus S' battery now reaches 40%-30% in ~16 hours, with always-on 3G, Wifi and GPS, oft use of phone, contacts, messaging, whatsapp, twitter, foursquare and browser, and infrequent use of music, market, maps, camera and rarer usage of games like Angry Birds (which consumes vast amounts of battery) and gallery.
All is well with the universe.
Certainly, this tale may or may not be a mirror to your own. Should you be experiencing similar problems, I hope my tale brings you solace, and provides a means to the end of your troubles.
demarcolister said:
Once upon a time, I too was one of the sullied - one those unfortunates souls, plagued with poor battery life on a Nexus S (stock FTW), brought on by an innocent (and joyful) upgrade to ICS 4.0.4 from 2.3.6.
When I first discovered the trouble, with great gusto, I ran to the interwebs and dutifully followed suggestions of restarting the phone or draining the battery, but alas - it was all to no avail. There is, however, a happy ending to this story. With effort and perseverance, I've since significantly improved performance. Here is my brief tale of success.
After the upgrade, Android (praise be its name!) decided to start, in the background, every single application on the phone. Verily Snake '97 was indeed running all the time. The horror!!! The game is entertaining certainly, but hardly worth keeping alive at the cost of other, more critical apps.
I was not deterred and took matters into my own hands. Using Manage Apps -> All (not Manage Apps -> Running, mind you), I went about Force Stopping each application (including some Android core apps). It was tedious and frightening. I was very careful and hesitant, as you should be if you are affected by a similar malady.
By the next day, I saw much improved battery life (hooray!), yet I wasn't free and clear. The hold of evil had not been loosened completely.
I found within, a strange and dangerous lock (wakelock - was that its name?) keeping the Gallery in the list of active applications, even when I had not used it for some time. It refused to move to the cached apps list. Puzzled, I scratched my empty head. The interwebs were of no use this time - I was on my own.
(cue ominous music)
Peering within, in the Sync section I found the system was trying to sync photos on an account where the checkbox for syncing was not selected.
A quick off-on-off stopped the syncing. The app slinked off the Running apps list. Soon, I was overjoyed, for I was experiencing improved battery life!
I've now returned to performance much closer to that from days of 2.3.6. My Nexus S' battery now reaches 40%-30% in ~16 hours, with always-on 3G, Wifi and GPS, oft use of phone, contacts, messaging, whatsapp, twitter, foursquare and browser, and infrequent use of music, market, maps, camera and rarer usage of games like Angry Birds (which consumes vast amounts of battery) and gallery.
All is well with the universe.
Certainly, this tale may or may not be a mirror to your own. Should you be experiencing similar problems, I hope my tale brings you solace, and provides a means to the end of your troubles.
Click to expand...
Click to collapse
You, my friend, deserve a cookie for such good writing.
@demarcolister Awesome first post here on XDA.
Great story too. Most will blame battery drain on the custom ROM/kernel they flash and fail to realize their battery drain is usually caused by a rogue app running in the background ...
I've never had good luck with the stock gallery app. I always freeze it via adb when I flash a new ROM. It seems much worse in ICS. It would always start back up.
Stock GB gallery was an absolute joke. Slow, missing thumbnails, weird background and hard to see what you're scrolling through. The stock ICS gallery i actually prefer over alternatives. Though i don't use picasa so that is disabled. Never an issue with it (besides always showing my damned album covers).
Harbb said:
You, my friend, deserve a cookie for such good writing.
Click to expand...
Click to collapse
nom nom nom!!
AeroEchelon said:
@demarcolister Awesome first post here on XDA.
Great story too. Most will blame battery drain on the custom ROM/kernel they flash and fail to realize their battery drain is usually caused by a rogue app running in the background ...
Click to expand...
Click to collapse
I was quick to (negative) judgement too, but I figured that Google would not (certainly!) release an update that completely cripples a modern and high-selling device.
Harbb said:
Stock GB gallery was an absolute joke. Slow, missing thumbnails, weird background and hard to see what you're scrolling through. The stock ICS gallery i actually prefer over alternatives. Though i don't use picasa so that is disabled. Never an issue with it (besides always showing my damned album covers).
Click to expand...
Click to collapse
Agreed! In fact, I'd accept, grudgingly, if album covers show up in the gallery (although, truly they should not), but I do not, under any circumstance, want to see the icons (tick for yes, cross for no, i for icons, etc.) used by an application in my Gallery. Idiocy!
What is the solution? I wish to remain Stock, so rooting and editing the equivalent of plist or config files is not an option. At least 'Camera' is the first option, always! That makes it usable, but as soon as I use picplz or camera360 or instagram their folders get shuffled in position. Is Google hinting at something!? *sigh*
Hey guys...
Sent from my Nexus S

Weird changes in terms of speed

I've had my U11 (64/4 variant) for a month now. I'm satisfied with it in general, but I've noticed something really peculiar.
In the first days, my U11 was extremely snappy and fast (opening applications, opening the camera, unlocking the screen, and so forth). However, after using it for a week, I noticed a strange phenomenon: the general speed of my phone was changing all the time. I mean, sometimes, I had to wait approximately 2 seconds for Gmail to load & display my inbox, while sometimes I just tapped on Gmail and it loaded & displayed my inbox almost instantly. (No, Gmail wasn't in the RAM in the latter case...)
It's still happening and I'm not happy about it because I ditched my S7 due to Samsung's tacky and laggy TouchWiz (I heard that it had been renamed, but I don't really care). Don't get me wrong: I'm not saying that SenseUI is laggy and tacky because I love it and I haven't even experienced a slight lag since I had this phone, but the unpredictable speed of my phone is irritating a little bit. By the way, the same goes for the camera (stock application): sometimes, it takes quite long for the camera to load & be ready, while sometimes it doesn't even take a second.
More than 90% of the storage is free and more than 50% of the RAM is free most of the time.
What do I do? Shall I perform a factory reset? As I've mentioned, I'm using the stock ROM and I want to do so in the future, too as I've got used to it.
Htc Boost+ app. If you dont have it get it. If you do have it then check the foreground and background restrictions.
If you're using any apps from 3rd parties that control apps and ram, remove them. Android has it's own app killer and boost+ will do the rest according to how you use the phone.
Signal clarity is also a huge player in the speed of today's devices. If you have a weak wifi or cell signal then the phone has to wait for the data transfer so server connections will suffer, hence why you experience intermittent slow loading.
The camera may take a while because of not being in background or if other apps are consuming resources. Also the more you use an app the quicker it should open as android 'should' hold the app in ram, if theres enough room.
Hope this helps clarify.
shivadow said:
Htc Boost+ app. If you dont have it get it. If you do have it then check the foreground and background restrictions.
If you're using any apps from 3rd parties that control apps and ram, remove them. Android has it's own app killer and boost+ will do the rest according to how you use the phone.
Signal clarity is also a huge player in the speed of today's devices. If you have a weak wifi or cell signal then the phone has to wait for the data transfer so server connections will suffer, hence why you experience intermittent slow loading.
The camera may take a while because of not being in background or if other apps are consuming resources. Also the more you use an app the quicker it should open as android 'should' hold the app in ram, if theres enough room.
Hope this helps clarify.
Click to expand...
Click to collapse
Thanks for your reply. I had already used the Boost+ before I posted this thread. I deleted a few apps that I hadn't really used, and now I don't have any problems with my phone as far as speed is concerned.

Categories

Resources