[mythtv-users] NTP drift...

Romain Kang romain at kzsu.stanford.edu
Fri Oct 13 17:25:13 UTC 2006

On Thu, Oct 12, 2006 at 11:53:37PM -0400, John Brooks wrote:
> mythtv at bombadil:~$ more /var/lib/ntp/ntp.drift
> -500.000

-500 is the largest negative value that ntpd uses.  In short, it
has freaked out and all bets are off.  Worse, if ntpd starts with
such a large value, good hardware will drift off to false values.
Every so often, when the discrepancy is large, ntpd will force a
step correction, and the error will follow a sawtooth pattern
over a period of several days.

> mythtv at bombadil:~$ ntpq -p
>     remote           refid      st t when poll reach   delay   offset jitter
> ==============================================================================
> stairway.tshis.    2 u  293 1024  377  2094.02  -2384.3 674.934
> time.sr.sonic.n   2 u  290 1024  377  1839.04  -2515.2 2056.10
> *excalibur.exsv.    3 u  420 1024  367  773.307  -4519.3 364.953
> hoas-fe1add00-1   3 u  301 1024  377  671.352  -4908.9 2359.75
> LOCAL(0)        LOCAL(0)        13 l   43   64  377    0.000    0.000   0.004

The units for delay, offset, and jitter are milliseconds.  By
comparison, my mythbox typically sees delays < 90 ms to Redhat's
NTP server on the other side of the US, with jitter and offsets
less than 20 ms.  If you're seeing values in the multi-second range,
it would appear your WAN connection can't uniformly deliver NTP
packets, certainly not along the paths to those servers.  One
assumption in the original NTP implementation was that roundtrip
delays were symmetric; no wonder ntpd is going insane.

Perhaps there's some hardware glitch on your box, but if it were
that bad, I'd expect MythTV to be unwatchable.

I would first see whether there's some network issue that can be
fixed.  By any chance, are you using a wireless network?  The kind
of variability in your output seems more characteristic of cell
phones, rather than DSL or cable modem.  Do ping roundtrip times
vary by similar amounts, both to WAN and LAN hosts?

If you can't get a reliable path to NTP servers, you may be better
off running without ntpd, and live with a few seconds of slop as
you would with a VCR.  Otherwise, if you're really keen on precision,
there are various ways to get your own local NTP reference through
GPS, radio, or landline connections.  You'll find this stuff discussed
in the comp.protocols.time.ntp group on Usenet...

Good luck,

More information about the mythtv-users mailing list