[ntp:questions] Getting NTP to correct only the clock skew

Spoon devnull at ntp.isc.org
Sat Apr 14 10:32:18 UTC 2007

Maarten Wiltink wrote:

> Spoon wrote:
>> Maarten Wiltink wrote:
>>> [...] could you monitor the buffer length and adjust frequency
>>> on system B from that? If it's slowly draining, slow down B a little;
>>> if it's growing, speed it up ever so slightly. Just like NTP does,
>>> really.
>> The very hard part (for me) is seeing that B's buffer is in fact slowly
>> draining when there is a lot of jitter on the link between A and B.
>> I've tried using an exponentially-weighted moving average to filter the
>> jitter out, but it didn't work as well as I had hoped. That is when I
>> turned to NTP. I'm trying not to reinvent the wheel.
>> Are you saying I should use the theory in NTP but not the daemon?
> Well, not _all_ the theory. Just the basic idea of slowing down a fast
> clock and speeding up a slow one. If it became too much work, I'd say
> you're better off just adopting NTP, all of it.
> But the jitter problem is (in retrospect) obviously inevitable - if
> you didn't have a jitter problem, you wouldn't have _any_ problem.
> So you need to filter, and that's the first step towards a full, but
> very roundabout, NTP implementation.
> Incidentally, IIAMN (and I've been before)

IIAMN? Did you mean IIANM (If I am not mistaken)?

> NTP uses a median filter
> to remove jitter. That throws away more information than a weighted
> average, which in this case is a good thing. You might try that
> before calling it a day.

I will definitely try that! I wonder why I didn't think of it myself.

Doh! :-)

More information about the questions mailing list