[ntp:questions] Google and leap seconds

unruh unruh at wormhole.physics.ubc.ca
Wed Sep 21 15:33:22 UTC 2011

On 2011-09-21, Marco Marongiu <brontolinux at gmail.com> wrote:
> Hi
> Thank you all for the interesting answers!
> I'd have one more question. Wouldn't it be convenient for ntpd to have
> an option, so that users may refuse to step back the clock in case of a
> leap second, and adjust the clock speed instead?

ntpd does NOT step the clock back. As a number of posts have said, it
adjusts the rate so that an extra second is inserted. IF you kernel does
not have leap second support, then ntpd will step (exceeding the 128 ms
threshold) in the default config, but it can be adjusted so that it will
slew the clock instead. But remember that ntpd is very slow to correct
time offsets. The max rate is 500ppm, or 1/2000 of a second per second.
Thus it would take at least 2000 sec to slew the clock. (more than that
actually because the system then has to settle down again, at roughly
halving of rate offset per hour). 

Some operating systems (eg Linux) have the ability to do a much faster
than 500PPM rate change (100000PPM in the case of Linux) but ntp does
not make use of that. 

> I understand the risk for this: systems in two subnets, each of which
> uses a different approach, will find them out of sync for a while after
> the leap second is inserted/deleted. Depending on the applications
> involved, this may have bad side effects. But is the current situation
> any better?
> Almost all here seem to agree on the fact that POSIX systems don't
> manage leap second insertion the right way. This seems almost impossible
> to fix because of the epoch definition. From the top of my head, I don't
> see any way to redefine the epoch to keep into account leap seconds,
> without breaking the compatibility in all directions (with older version
> of the same OS, or with another OS adhering to POSIX in this regard).

There is a time difference between UTC and TAI. That is not an ntp
problem. If youwant your computer to track UTC, you need to figure out
leap seconds. 

> If we accept that Google did the only thing they could do to avoid
> problems related to leap seconds, wouldn't it be good for ntpd to
> support such a behaviour "in bundle"?

> Ciao
> -- bronto

More information about the questions mailing list