Cellular Data Usage Spikes

I've been experimenting with ways to reduce a Boron's cellular data usage, and to help with this I started logging the data usage for the current day a few times an hour. I've noticed weird behavior in this: the data usage for the day gradually accumulates as I expect it to (and at the rate I expect it to), and then it jumps up by a large amount around the same time every day, usually doubling or tripling the daily total data usage. The size of this spike does not seem to be correlated with the rate of data usage during the rest of the day. Here is a graph of it over about a week:

The slope of the line differs from day to day because I have been flashing different firmware to pin down a causal relationship (the flashes result in much smaller jumps on those days that can be seen in the graph). The spike happens regardless of what the Boron is running. At first, it was directly connecting to a TCP server to bypass the cloud, which I stopped because that seemed like a likely factor, but this changed nothing. Then I stopped all event publishes, cloud variable and function calls, everything, and nothing changed. I then stopped vitals publishes, which did not change it, and finally I flashed Tinker, which shockingly still didn't stop the spikes.
Is something going on under the hood with Device OS or the way the cloud records cellular data usage to cause these spikes? I noticed the record didn't seem to be continuous and was only updated periodically every hour or so; are there some components of data usage that only are reflected in the total once per day?

Cellular data usage is not measured in real-time. Depending on your local carrier and the SIM you are using, it could be updated as infrequently as once per day, and sometimes delayed by a day or more from the actual time of usage. This is unavoidable because of how call detail records (CDR) are delivered to MVNOs (like Particle).


That makes sense. What is the typical expected data usage for a Boron that doesn't publish anything over one day (i.e. one running Tinker with no cloud variable or function calls)?

The initial cloud connection will take around 5K of data, and repeat every 3 days as the DTLS session needs to be re-authenticated every 3 days.

The rest of the data usage in the absence of publish, variable, and functions calls is keep-alive packets, which occur every 23 minutes by default and uses 122 bytes of data each. So 63 times per day is 7,686 bytes of data per day.

1 Like

The last three days on that graph were when the Boron was running Tinker (so only keep-alives and auth would be using data), but the total usage for those days are just over 20k, 40k, and 60k. If the max usage for a device with no other interactions with the cloud is ~12.8k, where could the rest be coming from? The gradual linear accumulation of those days is completely in line with 7.7k from keep-alives, but the spike completely overshoots that. If the spike was coming from session auth, it wouldn't be daily, and it would be much much smaller; these are at least 15k with most around 40k.

The spike is unusual and I'm not sure what the cause is. There are a bunch of tips in this page. You've done several of them already, but maybe something will stand out from that.

1 Like