[Q] Dual Core /proc/stats - Atrix 4G Q&A, Help & Troubleshooting

I've been working on building a dual core cpu meter for the atrix. I have a very very basic APK that reads your /proc/stats and displays it. I have noticed that on launch cpu 1 shows up and exists but after a few ticks, it's no longer there... I'm not saying that the phone isn't using it. I'd simply like to know why it's disappearing.. Sorry in advance if I posted in the wrong forum.
Edit: Is it safe to assume that since the core isnt being shown in the proc stats at certain intervals that the core is being put into a sort of 'standby' mode until a thread is passed to it? If so, could I default that core to 0% cpu usage when not shown.

Just a thought - do something to up your CPU, maybe spawn a couple processes to eat up some CPU cycles and see what happens?

mister_al said:
Just a thought - do something to up your CPU, maybe spawn a couple processes to eat up some CPU cycles and see what happens?
Click to expand...
Click to collapse
To max out kernel CPU time
cat /dev/zero > /dev/null

Related

[Q] Major Battery Drain While Using Words With Friends

I recently installed words with friends and have noticed a major drain on my battery caused by it slamming my cpu and RAM. All it is, is a scrabble type of game but continues to BASH my phone in the background. I have never experienced such drain from any game let alone a game that is not very graphic based. Something strange is happening here.
Has anybody else had the same issue? I don't remember it draining my battery as bad on my SGS 1.......
https://market.android.com/details?id=com.zynga.words&feature=search_result
Edit: Found this: http://androidforums.com/android-games/277995-beware-words-friends-eating-up-battery.html
The problem is happening on my best mates iPhone too
Its probably the apps code. Its making the phone run both cores at Max for no reason.
If your a root user try underclocking to 800 and see if its still bad.
Sent from my GT-I9100 using XDA App
Change background notifications to never in the account setting page. Also force close it in the battery status screen.
Sent from my GT-I9100 using XDA Premium App
Same thing happens to me. My phone gets so hot and my battery drains like crazy whenever I play the game. I wish the Developers would fix it, cause I love playing this game!
I use task killers (e.g., Advance Task Killer) to autokill the app when the phone is off, because sometimes the app still runs in the background. And whenever I turn my phone back on my battery is almost dead.
It's the problem with the app itself and until they fix the problem I'm keeping it away from my Android phone, that's lame.
Words is just a pain but my ios friends play it ...
What I do with mine is have a rooted phone and have tasker and have to cripple the phone to 500mhz max so it's still playable, just not speedy or it'll sit at 1000mhz looking at the game board but the waiting for moves screen can sit at 200mhz displaying ads
profile is words
entry
1. notify, "words running"
2. notify cancel, "words running"
3. cpu, gov powersave 500-500mhz
4. wait, 1second until %cpufreq < 510000
5. if, %cpufreq > 500000
6. goto 3
7. endif
8. cpu, gov conservative 200-500mhz
9. if, cpu > 500000
10. cpu powersave 500-500
11. endif
12. notify if %cpufreq < 510000, "throttled - max 500" with a icon of a hippo
exit
1. cpu gov, on demand 200-1200
2. notify cancel "throttled - max 500"
i also have a shortcut to task that launches words, just sets the gov to conservative 200-500 and loads words, the cpu freq won't stay at your max if it's already over the maximum
it loses smooth scrolling around the game board but uses half or less of the battery it did just running as is. when words isn't in the foreground it'll go back to whatever you set it to
Found this searching for my own issue. Just killing the app after closing it didn't help enough because it would still drain while I had it open.
Using the AT&T version I get the same issue. WordFeud's footprint is literally non-existant so I would suggest moving to that app. It's on iOS too.
I think they finally fixed it with the new words update
tallblazer124 said:
I think they finally fixed it with the new words update
Click to expand...
Click to collapse
Still seems to be killing me on a Droid PRO

Monitoring dual core CPU usage

What program can monitor dual core CPU load/usage simultaneously.... Both cores?
I thought it was system monitor pro, but it only has one CPU listed, (CPU 0) CPU 1 pops up briskly, but it doesn't display it..... unless my settings are wrong, or I'm doing it wrong.
Sent from my PG86100 using Tapatalk
Try system panel. And see if that's what your looking for.
Locked & Loaded
""shooter on Deck""
CPU gauge pro is what I use a nice lil widget for battery and CPU useage, shows temp, CPU frequency of each core, the load, the battery voltage all that good stuff
Shot from my shooter in 3D
injected with cleanrom2.8
System panel works... Its shows CPU 1 and CPU 2... But their is no activity from CPU 2.
Sent from my PG86100 using Tapatalk
try system tuner pro. it wont desplay cpu1 when it's not in use, but if you rapidly pull down and up the notificaton bar or somehting else it'll pop up.
bluephi1914 said:
System panel works... Its shows CPU 1 and CPU 2... But their is no activity from CPU 2.
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
Are you using a script to make the second core active???
Or one of the modified dual core kernels?? If not and your just running stock then system panel wont display usage because the second core on the Evo3d doesn't activate until the first core is under a heavy enough load to were the second core is needed.
Locked & Loaded
""shooter on Deck""
Ok, I wasnt using a script.... So I guess this is why it wasn't active. I just flashed version IV of trinity ROM now and both CPUs are showing. So either version IV has a script or I'm under a load
Sent from my PG86100 using Tapatalk
dkdude36 said:
try system tuner pro. it wont desplay cpu1 when it's not in use, but if you rapidly pull down and up the notificaton bar or somehting else it'll pop up.
Click to expand...
Click to collapse
That's what was happening, it would briefly show CPU 1 and CPU0 but one of the CPUs would go away
Sent from my PG86100 using Tapatalk
There is an option in system tuner pro to force second core online, however I find this useless as the second core kicks in when needed, just imo tho to each his own
Shot from my shooter in 3D
injected with cleanrom2.8

system tuner individual cores in widget?

hey i just got the system tuner pro app and have been poking around with the widgets and cant figure out how (if you can) get the widgets to display the usage stats of an individual core. i have been trying to do this because i have been messing around with the overclock settings that have recently been released and now i cant tell if the second core (cpu1) is active at all because in system tuner it always displays it as offline even in the performance governor. so since the app tells you the frequency of the individual cores and tells you when its offline and such (but doesn't keep a log) i thought maybe i could get a graph to display cpu and cpu1 individually to see if when i stress the phone in a game or something that it will kick on. any help is appreciated
Edit: Well i got the second core to go online but it would still be nice to know if i can get a widget to show the individual cores

Need help: investigating dualcore cpu0 cpu1 system coordination

Hi, all!
Some people, like me, may have downloaded a cpu-monitor app like System Tuner then notice their second cpu (cpu1) always appears offline.
First off, I recently realized that that is often inacurate. Using another app like SystemPanel would show both cpus being online, and more importantly, checking sys/devices/system/cpu/cpu1/online would show it's "1" indicating online. Many cpu app's inability to read cpu1's info is because "cpufreq" folder is missing from cpu1 folder (if you check cpu0's cpufreq folder it's always there).
K, now also, some poeple like me, thought cpu1 was really offline, and used System Tuner's "Force all cpus online" option, and viola, after reboot the second cpu showed up. But why? Cuz a "cpufreq" folder is found in cpu1 again.
What is interesting is both files "affected_cpus" and "related_cpus" would show "0 1" meaning core 0 and core 1 are in sync and both coordinated simultaneously. if you change settings(freq,governor,etc) for one core it automatically changes the other.
Now here's the tricky part, however after the tablet goes to sleep, when I wake it, cpu1's "cpufreq" folder would disappear again, meaning Sytem Tuner would show cpu1 agains as "offline". But if you chekc "online" file in folder you'll see it's still online ("1") and SystemPanes still shows cpu1 activity. However "affected_cpus" and "realated_cpus" will show only "0" meaning only cpu 0 is in this categoty and cores are no longer in sync.
Conclusion: so far what I deduced is my tablet in its default state has both cores online, but are off-sync. After turning on "Force all cpus online" and rebooting, they are both online and in-sync. After the device goes to sleep and wake, the two cores are still online but now off-sync.
The important thing about this investigation is how much it affects 3D performance. I was always confused why my device lags with a aged-game like Counter Strike portable but is perfectly smooth in a consol-quality game like Mass Effect Infiltrator. My current thought is Mass Effect acttively tweaks your cpu while most other games leave cpus as they are.
Benchmarking (using market benchmark apps):
(First off, the FPS difference may seem small but in running the actual games for some reason it made a enormous difference, often the difference between crashing and not crashing/playable or unplayable in Nova3/Shadowgun)
Default, newly flashed rom: FPS :33 (Some games fail to load graphics properly for some unknown reason)
Turn on "Force all cpus online" with Sys Tuner: FPS 39-40 (All games are silky smooth, no errors, tablet temp hotter)
"Force cpus online", then after wake from sleep: FPS: 33-34 (not as smooth before sleep, but games generally load properly)
**Switching my cpu0 gonernor to the same governor I think cpu1 is using: FPS 35-37 (no errors, almost as smooth as "Force cpus online")
Here's a crappy surprise --Cpu1 off (turn off dual core): FPS: 39. (Completely smooth, zero errors, hottest tablet temp)
**after cpufreq folder disappears from cpu1 I cannot be sure which governor cpu1 is using, but checked with Kernel Tuner and believe the system switch it back to "performance2" which is a governor foudn in my tablet.(it it not like "performance" governor) upthresh 60 downthresh 30 freqstep 5.
Conclusion:
This leads me to the conclusion that having both cpus online does not necessarily improve performance, but if the two cpus are off-sync it definitely BUTCHERS performance. It does so so badly that running one core is actually better. Having both cores run the same governor also seems to help somewhat.
Need help:
I hope the info so far may helped some people, but the help I also really need is someone to tell me how are "affected_cpus" and "related_cpus" controled by the system? So far I had no sccucess modding their values and forcing cpus to "sync". I enter "0 1" but it doesn't go through. Since having the cpus in sync seems to give good performance and lower temp (single core was good but temp was noticeably high), I want my cpu cores to remain in sync, but currently it undoes the sync after waking from sleep. I need to understand how and why the system somtimes decides to coordinate both cpus synchronously so both cpus appear under "affected_cpus" and "related_cpus"?
Thanks to anyone for reading!

Possible workaround for laggy UI response (stock firmware build 6.2.A.0.400)

This post is intended for only rooted users of Xperia go/P/U/sola phones that are currently running the stock firmware build 6.2.A.0.400 / Jelly Bean (or in the case of U/sola, the ported equivalent), and only users who are familiar with the terminal. If you satisfy the above criteria, read on.
Hi all, I've just discovered that disabling the second core of my Xperia go's CPU actually improves overall UI responsiveness in JB rather than the contrary, despite logic dictating otherwise. In fact, it's so smooth now that I can safely say it directly rivals GB's smoothness and response times (and this is from a long term GB user who just recently made the jump to JB, too).
I'm making this thread because I'd like to see if others will experience similar effects from disabling the second CPU core of their NovaThor U8500 SoCs.
Disclaimer: I am not responsible for anything in the unlikely event that you - somehow - break your phone from making this small tweak. Just saying. You should be fine if you follow the instructions, though.
You have to be running on battery power to be able to spot any difference since the UI's sluggishness isn't as noticable when connected to a power source. Oh, and leave your governor / clock speed settings at stock (i.e. interactive governor, 200 MHz min, 1000 MHz max) for a fairer comparison.
Open up a terminal window, then enter Superuser / root mode and enter the following command:
Code:
echo [B]0[/B] > /sys/devices/system/cpu/cpu[B]1[/B]/online
(that's a ZERO immediately after echo and a ONE in /cpu/cpu1)
This should immediately take the second core offline, you can verify it with the following command (do consider first opening an additional new terminal window for this purpose):
Code:
cat /proc/kmsg
Look for something along the lines of:
Code:
<5>[35017.521636] CPU1: shutdown
Now, start testing the responsiveness of the UI, it should be extremely smooth in comparison to what it normally is. Skeptics, please do feel free to drop your jaws at this point, because I sure did when I first tried this. I noticed that the processor's speed seemed to ramp up and down much more aggressively with the second core disabled, but that could just be me seeing things.
To re-enable the secondary core again, use this command:
Code:
echo [B]1[/B] > /sys/devices/system/cpu/cpu[B]1[/B]/online
(that's a ONE immediately after echo and a ONE in /cpu/cpu1)
You can verify that the core is enabled in the dmesg logs (remember the earlier cat /proc/kmsg command?):
Code:
<4>[35155.743408] CPU1: Booted secondary processor
<6>[35155.745011] Switched to NOHz mode on CPU #1
At this point, you're likely to see the sluggishness make a return.
This should be fairly obvious, but don't go doing "smart" (that was sarcasm, in case you missed it the first time) stuff like disabling the first core (or even both) because you'd clearly be asking for trouble.
I suspect that the presence of the second core is preventing the governor from ramping up the processor speed on battery power, leading to the sluggish UI response. It has been noted before that a pair of cores running at a lower clock speed can potentially be more power efficient than a single core running at a higher clock speed, so I'm not too sure how this would affect the phone's battery life. I haven't yet noticed any negative impacts of the change on battery life - if anything, battery life appears to be improved, but I'd like more people to test this out (preferably those on P, U and sola phones).
There is an app to do this.
Enviado desde mi ST25i usando Tapatalk 2
Diego910 said:
There is an app to do this.
Enviado desde mi ST25i usando Tapatalk 2
Click to expand...
Click to collapse
But in Xcore app the second core turns on automatically after sometime..
Does dat happen with the terminal method?!
Sent from my ST25i
In X-Core, after disabling the core, go to superuser app nd toggle permissions for X-Core... Second core doesn't switch on fr me that way...
Press thanks if I helped :thumbup:
dotafan said:
In X-Core, after disabling the core, go to superuser app nd toggle permissions for X-Core... Second core doesn't switch on fr me that way...
Press thanks if I helped :thumbup:
Click to expand...
Click to collapse
Tried it but in vain..
Sent from my ST25i
weired..

Categories

Resources