Re: [chrony-users] Getting time synchronization offset from chronyd |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
unruh@xxxxxxxxxxxxxx said:
> I believe ntp protocol uses TCP.
UDP
> That of course does not change the size of the packets sent/received. And
> usually traffic is charged per byte, not per connection.
> Fortunately ntp packets are not that big (something like 80 bytes).
48 bytes for basic NTP. 8 bytes for a UDP header. 20 bytes for an IPv4
header, 40 bytes for IPv6.
16 bytes for an Ethernet header plus 4 for the CRC. I don't know what, if
any, GSM uses for a header or how they count bytes for billing.
If you can piggyback on another packet pair that you are already sending, all
you need for time is 2 time stamps (8 bytes each) and an ID (4 or 8 bytes).
[You could save a few more by changing the second time stamp to a delta from
the first.]
Call it 20 bytes for a convenient round number. That's 25% of your 80 byte
number so it would save 75% of the NTP part of your network bill.
I don't know if that would be worth the effort but it seemed worth tossing the
idea out.
But it's more complicated than that. You only save that if you are already
sending traffic to a server that will give you time. You probably don't send
anything else to NTP servers. So in order to save anything, you have to stop
using NTP and get the time from the server(s) you are already talking to. If
you trust them enough to process your data, you can probably trust their time.
Alternatively, drop keeping the IoT device synchronized to UCT and use
time-since-boot. That requires changing the protocol which may not be
possible. But if the protocol is something like "X happend at T0" you can
change that to "X happened now" or X happened T seconds ago". That saves the
total NTP network budget.
--
These are my opinions. I hate spam.
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.