CPU usage while track recording

Started by joeloc, December 15, 2011, 20:15:29

0 Members and 1 Guest are viewing this topic.

joeloc

Something seems a bit bogus with Locus cpu usage while track recording.

My Galaxy Note stays mostly at 1400MhZ (dual core). Surely thats not really needed for simply storing away points from the GPS? Screen was OFF during measurements, but that didnt really change a thing.

GPS ON, Track Recording ON, Moving -> 1400MHZ

GPS ON, Track Recording OFF, Resting -> 200MHZ

GPS ON, Track Recording ON, Resting -> 1400MHZ

The last measurement is especially strange since Locus didnt have to store away any points then.

I can do more tests if required, but maybe you have some idea what's going on already? In the end, it would be nice if simple "track logger usage" (screen off and track recording on) would keep the processor at its slowest setting.
  •  

Menion

#1
hmm this is weird. Low CPU usage is for sure my main priority during track recording. When screen is off, then CPU usage should be really very very low, because no draw methods are used. I'll check it also, but for now ... no idea how this can happen
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

#2
could of course be my methods of measuring... no idea. i used cpuspy and have locus sit quietly on the window for ten minutes with track recording on. 7:30 mins were spent at 1400MHZ and 2:20 mins at 200MHZ.
  •  

zailor

#3
ok i have not measured the cpu rate BUT  i know that my  htc wildfire don't like track recording ;-)
I use Locus a lot with my sailingboat AND i really want to use track recording.
So thats way I save tracks every 20 min and start a new one.
Very importent to uncheck the old one !!
If I not do like this, the zoomfunction get slower and slower ( and of course other funtions to )
Ok, i blame my "tired" wildfire and wait for my Samsung Galaxy S2 ;-)
BUT I think this "test" with the wildfire tell us something !? ( high cpu usage at track recording )
Sooooo if this is some kind of bug ???? I perhapes don't need to buy a Samsung ;-(
/zailor
  •  

berkley

#4
It is not only about CPU rate, it is also about RAM usage.

So please check, if you can use the settings for track recording. You definatly don't need to record every second and every moved meter. Just as an example. There is also an option - don't remember how it is called right now - to reduce the recorded points which are shown on the map. Limited points on the map needs less calculation which means lower CPU and RAM usage.

Cheers
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
  •  

joeloc

#5
I made a direct comparison of Locus vs Oruxmaps, track recording on, screen off, comparable settings, phone sitting quietly on window for ten minutes. Locus spent about 70% of time at 1400MHZ, Oruxmaps only 20%. Something still seems fishy :-).

Measuring was done with cpuspy. Of course there can be a million reasons for this, not neccessarily being Locus fault. Some code paths might work better with some schedulers than others. Android is a complex beast.
  •  

Menion

#6
hmm,
  I did some more updates to drawing system of whole locus. So ... may you test cpuspy on testing version? Because I tried it and (nice program anyway) if showed me most time in 200MHz part ... and only around 10% in 1200 :) ... so improvements did more then I expect :) or I have some different settings compare to yours ... thanks
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

#7
sorry, still the same cpu usage with latest test version. about 70% on 1400mhz when track recording is on. screen off, phone sits quietly on window, gps fix acquired. system settings / location / use sensor aiding is disabled btw for these tests, otherwise android would simply turn the gps off after a while.

exact same test but with track recording OFF: only 5% at 1400 and 90% at 200MHZ!!

Maybe it has to do with the track recording message in notification area? Is it accidently updated too often? Or something on locus screen? Although the screen is off... I have no clue :)
  •  

Menion

#8
hmm this is weird. Do you know testing feature in locus that use NMEA messages? When you store during GPS on, NMEA messages to file and then put this file to cache/nmea, you'll able to turn on GPS - faked GPS, where source come from this NMEA data. Quite useful for some navigation and track recording testing. With this, I have after 20 mins of recording 12% on 1200MHz, 30% 800, 43 on 200MHz and some between ... hmm

about notification. I already discovered that this notification take really a lot of power. That's the reason why updating of notification is completely disabled
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

#9
nmea recording was off during my tests. i only tested real gps data logging.

do you write other files while track recording? my locus dir is on sdcard/external_sd, maybe the external microsd makes a difference? although, since the phone was sitting quietly on the window, there were only very few points recorded. maybe five total.

but seriously... this result can have a million reasons. maybe it's only on my ROM or on galaxy notes or whatever. maybe you wait for other cpuspy reports from other people before wasting more time on this :-)
  •  

joeloc

#10
I just managed to get the 1400MHZ rate down to 1%, remaining usage is 200MHZ 60% and 500MHZ (20%) on track recording?

How? The tool "Antutu CPU Master Pro" allows to change the cpu frequency scaling algorithm. Android default on 2.3.6 is something called "ondemand" which goes up to Fullspeed rather quickly (probably after a few microsecs) when something is happening.

The setting "conservative" scales up a bit slower... probably slow enough so it is not triggered by simply reading data from gps driver every now and then. Result is very low cpu clock speed during track logging. Disadvantage could be a slightly larger lag when using the phone, although I didnt notice anything yet.

The pay version of Antutu CPU Master Pro would for example allow to set the scaling to "conservative" automatically only when screen is off.
  •  

joeloc

#11
HOWEVER... even with the conservative schedule governor, there is still a big difference in cpu usage depending on which map is enabled in Locus:

map "blank": 200MHZ almost 80%, 500MHZ 20%
mapsforge vector map: 200MHZ 30%, 500MHZ 70%(!)

certainly, the type of map should not make any difference at all when the screen is off?! something is bogus and locus still seems to call some rendering code, even if nothing needs to be rendered.
  •  

Menion

#12
hmm this is really weird because "not needed" redraw is one of improved things in testing version! When screen is OFF, there shouldn't be any of such tasks ... I'll check it tomorrow. And about difference of maps ... MapsForge maps need really a lot of CPU. I'm wondering that there is only 70% of 500MHz and not a more!!
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

joeloc

#13
I was just wondering... maybe there's a difference if Locus is minimized by home-key or if the screen is simply turned off while Locus was active?
  •  

Menion

#14
hmm weird, test with latest version ... here is settings viewtopic.php?f=10&t=1440#p8577 and below is result from cpuspy

[attachment=0:2ngfnk2s]shot_Dec_20_2011_0.png[/attachment:2ngfnk2s]

quite nice result I think. Also for almost whole time was running music. Battery consumption around 28% for that time ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •