Device data usage optimization

tmfa year ago

On android phone I noted data usage of gpslogger simply logging to a custom url that is about 200 bytes, and it's logging to http, however I note that it's using like 10k per access, what am I missing?

Anton Tananaeva year ago

What gpslogger are you talking about? Where did you get the 10k per access?

tmfa year ago

Its the app called gpslogger for android.

I went into mobile data on the android phone, where it shows data usage per app, I went to the gpslogger app and it showed X used, I then waited 10 minutes while it sent data. It sends once per 10s, so 10 minutes later it had sent 60 positions, I then looked to see that the new usage was say Y, then calced (Y-X)/60 to get 10,000 bytes :-(

tmfa year ago

https://gpslogger.app/

I am going to do the same with traccar client and see what I get...

Anton Tananaeva year ago

It sounds about right. TCP and HTTP have a lot of overhead.

tmfa year ago

Are there options to reduce this with a different method? I know things like ethernet packet sizes of 1460/1500 exist, I kind of thought it would fit into at least 1460 max.... but 10K is insane. When you are trying to offer a service to track and cellular data ain't cheap, its the difference from 2.5G/m to 250M/m... at least at highter sample rates of like 10 seconds.

Will report shortly what I find the the traccar client.

Anton Tananaeva year ago

Sorry, I misread your earlier message. 10k / 60 requests is ok, but not 10k per request. But what you're measuring is not necessarily the right thing. Apps can have some analytics and logging.

tmfa year ago

yeah 10k per! not sure whats up there yet, however looks like the traccar client app is doing about 350 bytes transfer.... calced from the anrdoid stats...

i also did a
'tcpdump dst port 5055' on my server and it says 384-387 bytes received
'tcpdump src port 5055' on my server and it says 38 bytes sent back to app

tmfa year ago

I captured the whole data packet coming in and I see, maybe in future releases, you can save people a lot of data usage as there is more information than really required.

At least the speed, bearing, accuravy, and altitude have way too many decimals places, but cutting those back to xxx.xx you save about 40 bytes
Also setting the user agent to a much shorted string can save about 50 more...

So for someone sending every 10 secconds, it saves around 25MB/month (when using IOT M2M sim cards it can make a difference to a fleet!)

POST /?id=heather-phone×tamp=1699987241&lat=XX.2930571&lon=XX.7403463&speed=0.005777115771498531&bearing=0.0&altitude=60.900390625&accuracy=36.41299819946289&batt=80.0 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Dalvik/2.1.0 (Linux; U; Android 13; CPH2513 Build/RKQ1.211119.001)
Host: themindfactory.com:5055
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Length: 0