[ntp:questions] Getting NTP to correct only the clock skew
root at localhost.invalid
Thu Apr 5 17:59:48 UTC 2007
Richard B. gilbert wrote:
> Spoon wrote:
>> Richard B. gilbert wrote:
>>> Spoon wrote:
>>>> I've read this page:
>>>> which explains how to let NTP determine the frequency offset (skew).
>>>> I have a strange request:
>>>> Is it possible to run NTP in a mode where it does not try to correct
>>>> the time offset, but only correct the frequency offset (skew)?
>>>> In other words, assume my clock says it is some time last year, and
>>>> gains 1 second every day (11.6 ppm). I don't want NTP to either slew
>>>> or step my clock to the correct time, but I still would want it to fix
>>>> this 1 s per day (11.6 ppm) frequency offset.
>>>> Has this ever been considered?
>>> What problem are you trying to solve?
>>> Most people want the correct time rather than simply a clock keeping the
>>> wrong time but one that ticks at one second per second.
>> I'll try to explain my situation in detail.
>> Consider two systems, A and B.
>> A sends ~1000 UDP packets per second to B.
>> A timestamps each packet.
>> These packets travel over an IP network, and suffer delay and jitter.
>> B is supposed to re-send the packets it receives at the rate they
>> were originally sent by A.
>> B buffers N packets. Then it sends the first packet in the queue,
>> computes the departure time of the next packet using the timestamps
>> provided by A, and sleeps until that departure time.
>> If the clocks on A and B do not tick at the same rate, the buffer used
>> by B will either overflow or underflow.
>> This is why I need A's clock and B's clock to tick at the same rate.
>> But it is not important to me that A and B's clock give the same
>> absolute time. Was that clear or did I forget something important?
> ntpd should be able to both keep your clocks synchronized to the same
> time but also to the same rate. There WILL be startup transients but
> once the two machines are synchronized they should both have the same
> time, within a millisecond or two and be ticking at 1.000000 seconds per
If I start ntpd when the system boots, and let it run 60-90 minutes
before I start my application, then this solution works very well!
However, my boss thinks it is unacceptable to have to wait so long to
start the application :-(
> Is there some good reason why A's packets must be relayed through B?
> Does B do any processing of the packets or does it simply forward them?
B sends the packets it receives to a local device. Why do you ask?
More information about the questions