[PATCH 0/5] Fix ntpd to not poll frequently
Miroslav Lichvar
mlichvar at redhat.com
Fri Sep 26 09:24:22 UTC 2014
On Thu, Sep 25, 2014 at 06:52:32PM +0200, Denys Vlasenko wrote:
> On Thu, Sep 25, 2014 at 5:47 PM, Denys Vlasenko
> How about this patch?
>
> * on step, poll interval drops to 8.5 mins instead of 32 seconds
Ok, that's an improvement.
> * on total loss of all replies (no replies from any peer
> for last 8 requests), also drop poll interval to 8.5 mins
> instead of 32 seconds
Better, but I'm still not convinced poll should be dropped here. I'd
say the most common case of network going down is already handled by
checking for sendto() errors.
> * on recv error, RETRY_INTERVAL is now 32 sec, not 5 sec
I don't think that's good enough. The recv() errors should be handled
as if no reply was received, increasing the polling interval
exponentially.
> * on timing out listening to reply, instead of unconditional
> shortening poll interval by x4, clamp it to NOREPLY_INTERVAL
> (512 seconds).
Hm, so you still want to shorten the interval when no reply is
received (although not as much as before) and there is still the
problem of polling fixed at a short interval, e.g. at 32s when no
replies are received after ntpd start.
If you want to play nicely with others on internet, exponential
back-off is a requirement, not something you choose not to do because
you don't want to wait too long for clock updates. The fact there are
other NTP clients polling frequently is not an excuse.
I'm not sure what else can I do to convince you. Perhaps you could ask
on the pool.ntp.org list and see what suggestions they have.
--
Miroslav Lichvar
More information about the busybox
mailing list