TweakStock 1.4 & kswapd0 lag - potential solution - Verizon Droid Charge

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!

Related

[Q] EC10 Mesmerize Process strain

Hi guys,
I have a USCC Mesmerize with EC10 PNP w/ none of the pack addons.
I would consider my phone to be very slim. I pretty much only use the camera, sms, mms, internet, & phone.
But still after my phone has been on for a while my process is up to 295/349 MB
I constantly use the stock task manager with Level 2 clear memory option to kill the active process.
When I do this I normally close anywhere from 5-12 process's. Sometimes I will get a drop to around 245MB and other times it will stick around 282MB
On a fresh restart my phone boots up with 164MB
I immediately goto task manager and do a level 2 clearing of the memory and end up closing 10 programs with a RAM use of 131MB
Is there anything out there app or otherwise I can use to stop and prevent all non-critical process's?
uselessmidget said:
Hi guys,
I have a USCC Mesmerize with EC10 PNP w/ none of the pack addons.
I would consider my phone to be very slim. I pretty much only use the camera, sms, mms, internet, & phone.
But still after my phone has been on for a while my process is up to 295/349 MB
I constantly use the stock task manager with Level 2 clear memory option to kill the active process.
When I do this I normally close anywhere from 5-12 process's. Sometimes I will get a drop to around 245MB and other times it will stick around 282MB
On a fresh restart my phone boots up with 164MB
I immediately goto task manager and do a level 2 clearing of the memory and end up closing 10 programs with a RAM use of 131MB
Is there anything out there app or otherwise I can use to stop and prevent all non-critical process's?
Click to expand...
Click to collapse
That sounds pretty normal from what I have seen. Are you having any issues or just like to see the Rom lower?
Actually android by design is supposed to run almost always at full ram/memory compacity. Using a task killer other than stock can give unwanted results. My phone runs the same as yours does. When you kill off task the systen will automaticly reload common and system apps. Its the nature of android. Unless your having really bad performance. I wouldn't worry about it.
Edit: Ninja'd.
Tap-a-Talked from my Mesmerize
I agree with akellar, that sounds pretty normal. I mean, are you actually suffering any performance issues? If you're not, then you're just worrying about nothing.
Similar stuff here. I use the level 2 clear as well, but mainly to save battery. I run the clear,just before I set it down for a no use period or prior to bedtime and it saves battery big time.
Sent from my SCH-I500 using Tapatalk
No not really any performance issues. Sometimes but its infrequent enough that I couldn't describe it.
That was mainly my thought was saving on battery.
Why have all this crap running if you aren't using it?
Technicly its not running. It is suspended. While it is in ram it isn't using any processing power until the app is brought to the foreground meaning you are using it. Android does this so these apps are ready to go when you need them. I quit using task killers other than the stock one a while back and noticed a big jump in battery and performance. I though they were helping me when in reality it was hurting me. Take a read on android and how it handles multi tasking. It explains it really well. I wish I had a link handy hut if you google it you will find several articles on it.
Tap-a-Talked from my Mesmerize
Yeah, you are actually wasting battery by having the screen on in order to end tasks that aren't actually running.
Either way, my battery lasts longer. I understand the logic, but in reality - my battery lasts longer.
Sent from my SCH-I500 using Tapatalk
I've read probably 20 or 30 articles on this explaining bboth sides and hundreds of user opinions who say to use them, don't use them, use them once a day, etc and why they think that. I really think it depends on what you do with your phone, because in my personal experience I am a heavy user of my phone, constantly switching applications and loading browsers and whatnot. If I don't use a taskkiller then my phone becomes unresponsive and almost unusable at times. I know you're supposed to stay away from them and I have tried that but it is really obvious that it is useful when I can press a button and have my phone actually work again.
For somebody like the OP that just uses it like a normal phone and not a computer like I do, you probably shouldn't use one unless you are really getting slowdowns. It all depends on what exactly is using the memory and not getting killed by the system.
Sent from my CM7 SCH-i500
I agree to an extent. I use the paid version of system panel to monitor apps like that from time to time. I use the stock task killer and do a level two kill after I have been on my phone switching between programs and such. And it does make a difference is performance. Depending on what you are dping depends on whether you should use one or not. I thinl the big depate is whether you should use an auto kill function. Its one thing to kill all task here and there to improve performance but another to have an app doing it every five or ten minutes. I think that's were the big battery drains happen. Anyway. To each there own and if they see it helps them in how there phone performs and are happy with the results, then maybe a task killer ia for them. For me. I just use the stock task manager and it works fine.
Tap-a-Talked from my Mesmerize

[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

CM7 battery life

I know that CM7 is a WIP so i dont expect much..but is everyone having significant battery drains on CM7? My battery is running out within 4-5 hours of normal use, surfing web, texts, google music etc. My display is all the way down. What is draining the battery alot? Right now im on a fresh install of mookOSmtd build1. Other than battery and camcorder everything is extremely smooth on CM7 so far..
I'm working on some tweaks for miui and mokee which both share the cm7 boot.img. Be patient. Some advice for now, turn off background data in accounts and sync settings when you don't need it, as well as data and wifi and auto sync...
Your battery might be on it's way out. That is really bad life. How are other ROMs doing in comparison? I haven't been on CM7 in a week or so but I was getting at least a day out of it.
Same bad battery life here. As it's been been figured out in another thread, it's about modem. Flashing other modem did not help me though. So it's up to developers when it'll be fixed.
Until then, the only workaround I found was to turn off synching, data and wifi. Then I'm getting good battery life.
It's a work in progress ROM, we know what we're getting into. Nevertheless, it's still one of the best ROMs around.
Sent from my SGH-T959V using XDA
Some things I have found with CM7 based ROM (MIUI more specifically)...
So, I have been working on trying to improved battery life for MIUI MTD and have found some things that help.
The modem seems to be the biggest culprate. I had notice that it was switching from 3G to H every couple of seconds. So the first thing I did was flash an older modem (KD1). and that fixed that issue. But, my battery life was still a bit below par. I pulled a logcat and saw that delvik was dumping and refresh quite often. This is where it may be different if you are using any CM7 ROM other than Team Kick Asses MIUI. I edited the governor tweak by turning the up_threshold to 80. Unfortunately I sacrificed a little bit of performance, but the battery life was becoming more desirable. I also took my own advice and performed steps 1 thru 3 of the Gremlin Remover process (link in my signature, just follow the OP. No need to run the 1-Click as it is only meant for worst case scenarios). For me, the Gremlin Remover process yielded the best results (mainly the battery pull and complete power down method). Thru further investigation, I noticed something would connect to data (little up and down arrows next to signal bar) every time I would unlock the screen. It seems that google services is the guilty one in this case. So I turned off automatic sync in accounts & sync settings. Again, a little bit of a boost there as well. You can always sync manually. But then there is background data that is connecting a lot as well. So I turned it off too (a well known trick that has been around... don't forget about turning off wifi when not using it and data). Unfortunately, by turning off background data, certain things like google voice mail and gtalk don't work, so I had to turn it back on. Now, after reviewing the logcat again, dalvik is refreshing and clearing A LOT. So I edited the build.prop by changing heap size to 128 and removed any other entries in the build.prop that dealt with dalvik (for testing purposes ONLY), rebooted to recovery via the button method, cleared cache and dalvik cache, rebooted an let phone sit for a while. Things seem to be running wuite smoothly, and the battery is lasting about 12 hours for me now (which included 4, 1 hour long phone calls, about 5 quick calls, lots of texting, web browsing, and playing a fwe games while I sat and waited a few times). Do not edit the build.prop if you don't know what you are doing. I will post more comprehensive details later as it is getting time for me to head to work.
I completely understand and recognize that CM7 is a WIP, but these are just some suggestions and ideas that I am passing off to you.
also, I haven't looked into the CM build prop, so i don't know the default dm heap size.
It might be low.
FOR PEOPLE TO GET BETTER LIFE::::go to settings-->Cyanogenmod Settings-->Performance-->set DM Heap size to allowable maximum.
airfluip1 said:
also, I haven't looked into the CM build prop, so i don't know the default dm heap size.
It might be low.
FOR PEOPLE TO GET BETTER LIFE::::go to settings-->Cyanogenmod Settings-->Performance-->set DM Heap size to allowable maximum.
Click to expand...
Click to collapse
It's 64mb
thomas.raines said:
It's 64mb
Click to expand...
Click to collapse
That is odd on mokee 48 is the largest available.
ditto on CM, just looked into it.
I thought the default for cm7 was 48? Which is low...
Sent from my SGH-T959V using XDA

Aggressive Task Killer

So, Sense has always been this way for a while (the HTC EVO 4G LTE was the worst of them all), and I see that the U11 with *almost stock* software and 4GB of RAM is not enough for it to keep a few more apps in the background.
This is bothersome when trying to play games that start over every time that I switch to another app! Even XDA just restarted and I lost half of this post that I was writing. I don't actually see it as a bug or faulty software...just very aggressive RAM management.
Is there any solution to this? Do custom ROMS even solve this issue?
+1, I'd also like to see how to make the RAM management less aggressive. Right now when I play a game, then switch to Chrome, Facebook, or even just public transport timetables app and then go back, game usually starts over. I thought 4 GB of RAM would be enough to have two games loaded, apparently not
LuH said:
+1, I'd also like to see how to make the RAM management less aggressive. Right now when I play a game, then switch to Chrome, Facebook, or even just public transport timetables app and then go back, game usually starts over. I thought 4 GB of RAM would be enough to have two games loaded, apparently not
Click to expand...
Click to collapse
I don't think that the 4GB of RAM is to blame. There is no justification for closing a game to send a TEXT! I think that they just try to keep as much RAM available at all times, at the cost of convenience.
Boost+ enabled,?
Yeah I think it's the boost+ app. Uninstall it and check. I don't use it and I just launched 25apps and none of them reloads.
Update: hmmm actually they started reloading after 3 mins. Not all of them but half. Wierd. I don't mind though as long as the battery stays like this.
In boost+ I don't allow the background optimizer to kick in in less than 3 days on apps I want to run in background, so that's probably not it.
LuH said:
In boost+ I don't allow the background optimizer to kick in in less than 3 days on apps I want to run in background, so that's probably not it.
Click to expand...
Click to collapse
Neither do I. Even coming from a fresh install and rejecting Boost+, the Task Killer is still aggressive.
I think that it depends on the OOM settings (I think that is the correct acronym...haven't dealt with those for a WHILE....).
I was getting frustrated with a lot of my apps pretty much closing every time I backed out of them causing me to have a huge delay in getting notifications as a best case scenario, and sometimes not getting any at all unless I actually opened the app again, Facebook/Messenger being the biggest culprits, but many others too.
Looking in Settings/Power/Battery Optimization I found that nearly all my apps say they are being optimized. I've never used Boost+ so it seems they have defaulted to this. After toggling a few apps to Not Optimized I've found that these apps no longer close and need to reload when I back out, and notifications come through in a timely manner. Battery life seems unaffected, I still easily get through a day and have at least 50% remaining at bed time. Might be worth looking at
liberator72 said:
I was getting frustrated with a lot of my apps pretty much closing every time I backed out of them causing me to have a huge delay in getting notifications as a best case scenario, and sometimes not getting any at all unless I actually opened the app again, Facebook/Messenger being the biggest culprits, but many others too.
Looking in Settings/Power/Battery Optimization I found that nearly all my apps say they are being optimized. I've never used Boost+ so it seems they have defaulted to this. After toggling a few apps to Not Optimized I've found that these apps no longer close and need to reload when I back out, and notifications come through in a timely manner. Battery life seems unaffected, I still easily get through a day and have at least 50% remaining at bed time. Might be worth looking at
Click to expand...
Click to collapse
Bro....thank...you! This definitely made a difference so far.... I'll pay attention to see if it makes a big difference in the long run...
Testing as well, thanks! It doesn't seem connected to Boost+ and appears all my apps are optimized by default - even those I never ran on this phone.
Yeah it had me stumped at first but I noticed it last week and changed it then and have had no problems since. Hopefully it sorts it for you too
liberator72 said:
Yeah it had me stumped at first but I noticed it last week and changed it then and have had no problems since. Hopefully it sorts it for you too
Click to expand...
Click to collapse
Still restarting apps quicker than I prefer, but much better. Thanks!
The problem is android and how it handles apps. If you want to switch apps then use the recents list to use the multi app function (splitscreen).
Beamed in by telepathy.

How to track apps using CPU/RAM usage

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

Categories

Resources