We’ve beforehand described why we predict it’s time to go away the leap second up to now. In as we speak’s quickly evolving digital panorama, introducing new leap seconds to account for the long-term slowdown of the Earth’s rotation is a dangerous follow that, frankly, does extra hurt than good. That is notably true within the knowledge middle area, the place new protocols like Precision Time Protocol (PTP) are permitting methods to be synchronized all the way down to nanosecond precision.
With the ever-growing demand for greater precision time distribution, and the bigger position of PTP for time synchronization in knowledge facilities, we have to contemplate tackle leap seconds inside methods that use PTP and are thus far more time delicate.
Leap second smearing – an answer previous its time
Leap second smearing is a technique of adjusting the speeds of clocks to accommodate the correction that has been a standard technique for dealing with leap seconds. At Meta, we’ve historically centered our smearing effort on NTP because it has been the de facto normal for time synchronization in knowledge facilities.
In massive NTP deployments, leap second smearing is usually carried out on the Stratum 2 (layer), which consists of NTP servers that immediately work together with NTP purchasers (the Stratum 3) which might be the downstream customers of the NTP service.
There are a number of approaches to smearing. Within the case of NTP, linear or quadratic smearing formulation will be utilized.
Quadratic smearing is usually most popular as a result of layered nature of the NTP protocol, the place purchasers are inspired to dynamically modify their polling interval as the worth of pending correction will increase. This answer has its personal tradeoffs, akin to inconsistent changes, which might result in completely different offset values throughout a big server fleet.
Linear smearing could also be superior if a whole fleet is counting on the identical time sources and performs smearing on the identical time. Together with extra frequent sync cycles of sometimes as soon as per second, it is a extra predictable, exact and dependable strategy.

Dealing with leap seconds in PTP
In distinction to NTP, which synchronizes on the millisecond degree, PTP supplies a degree of precision sometimes within the vary of nanoseconds. At this degree of precision even periodic linear smearing would create an excessive amount of delta throughout the fleet and violate ensures supplied to the shoppers.
To deal with leap seconds in a PTP surroundings we take an algorithmic strategy that shifts time routinely for methods that use PTP and mix this with an emphasis on utilizing Coordinated Common Time (UTC) over Worldwide Atomic Time (TAI).
Self-smearing
At Meta, customers work together with the PTP service through the fbclock library, which supplies a tuple of values, {earliest_ns, latest_ns}, which represents a time interval known as the Window of Uncertainty (WOU). Every time the library is named through the smearing interval we modify the return values based mostly on the smearing algorithm, which shifts the time values 1 nanosecond each 62.5 microseconds.
This strategy has an a variety of benefits, together with being fully stateless and reproducible. The service continues to make the most of TAI timestamps however can return UTC timestamps to purchasers through the API. And, as the beginning time is decided by tzdata timestamps, the present smearing place will be decided even after a server is rebooted.
This strategy does include some tradeoffs. For instance, because the leap smearing technique differs between the NTP (quadratic) and PTP (linear) ecosystems, companies could wrestle to match timestamps acquired from completely different sources through the smearing interval.
The distinction between two approaches can imply variations of over 100 microseconds, creating challenges for companies that eat time from each methods.
UTC over TAI
The smearing technique we carried out in our fbclock library reveals good efficiency. Nevertheless, it nonetheless introduces vital time deltas between a number of hosts through the smearing interval, regardless of being absolutely stateless and utilizing small (1 nanosecond) and glued step sizes.
One other vital disadvantage comes from periodically working jobs. Smearing time means our scheduling is off by near 1 millisecond after 60 seconds for companies that run at exact intervals.

This isn’t splendid for a service that ensures nanosecond-level accuracy and precision.
Because of this, we suggest that prospects use TAI over UTC and thus keep away from having to cope with the leap seconds. Sadly, although, normally, the conversion to UTC continues to be required and finally must be carried out someplace.
PTP with out leap seconds
At Meta, we assist the latest push to freeze any new leap seconds after 2035. If we are able to stop the introduction of latest leap seconds, then your entire business can depend on UTC as an alternative of TAI for greater precision timekeeping. It will simplify infrastructure and take away the necessity for various smearing options.
Finally, a future with out leap seconds is one the place we are able to push methods to larger ranges of timekeeping precision extra simply and effectively.













Users Today : 0
Users Yesterday : 0
This Month : 0
This Year : 96140
![Is Tesla Chasing Short-Term Profits Ahead of Long-Term Loyalty? [Opinion] Is Tesla Chasing Short-Term Profits Ahead of Long-Term Loyalty? [Opinion]](https://i2.wp.com/www.notateslaapp.com/img/containers/article_images/giga-factories/2-million-fremont-factory.jpg/8c4ab26062de6f1d20059680199f57c9/2-million-fremont-factory.jpg?w=120&resize=120,86&ssl=1)



