Why Google Smears the Leap Second
๐กLeap-second handling can silently break distributed AI jobs, leases, logs, and cross-cloud coordination.
โก 30-Second TL;DR
What Changed
Leap seconds can break POSIX time assumptions, timestamp ordering, locks, timers, and distributed database consistency.
Why It Matters
AI infrastructure depends on reliable timestamps for distributed training, job scheduling, observability, leases, and database coordination. Inconsistent cloud smear policies can create subtle ordering and reconciliation bugs in multi-cloud AI platforms.
What To Do Next
Audit your AI services for wall-clock usage, replace interval calculations with monotonic clocks, and document the cloud provider's leap-second smear policy.
Key Points
- โขLeap seconds can break POSIX time assumptions, timestamp ordering, locks, timers, and distributed database consistency.
- โขGoogle gradually slows clock frequency around a leap second so systems never observe 23:59:60 or a backward time jump.
- โขAWS, Google, Meta, and Microsoft use different smear windows or curves, creating cross-provider time discrepancies.
- โขThe 2022 CGPM resolution aims to eliminate leap seconds from UTC by 2035.
๐ง Deep Insight
AI-generated analysis for this event.
๐ Enhanced Key Takeaways
- โขThe leap second was introduced in 1972 by the International Bureau of Weights and Measures (BIPM) to reconcile atomic time (TAI) with Earth's rotation (UT1), but it has become increasingly problematic for high-frequency trading and distributed computing.
- โขGoogle's 'smear' implementation is specifically applied to their Network Time Protocol (NTP) servers, which serve time to Google Cloud instances and internal infrastructure, rather than modifying the hardware clock directly.
- โขThe 2022 CGPM resolution (Resolution 4) mandates that the maximum difference between UTC and UT1 be increased from 0.9 seconds to at least 1 minute by 2035, effectively rendering the leap second obsolete for standard timekeeping.
- โขMeta (Facebook) proposed an alternative approach called 'Leap Smearing' in 2011, which influenced the industry-wide adoption of spreading the leap second over a 24-hour period to avoid the 'negative leap second' problem.
- โขThe primary technical risk of leap seconds is the 'negative leap second' scenario, where a clock would need to jump from 23:59:58 to 00:00:00, skipping 23:59:59, which many legacy software systems are not designed to handle.
๐ Competitor Analysisโธ Show
| Feature | Google (GCP) | AWS | Meta | Microsoft (Azure) |
|---|---|---|---|---|
| Smear Window | 24 hours (12h before/after) | 24 hours (12h before/after) | 17 hours | 24 hours (12h before/after) |
| NTP Offset | Linear | Linear | Linear | Linear |
| Compatibility | Google-specific | AWS-specific | Internal/Open Source | Azure-specific |
๐ ๏ธ Technical Deep Dive
- Google's NTP servers adjust the frequency of the clock by a small amount, typically around 13.9 microseconds per second, to achieve a 1-second shift over 24 hours.
- The smear is applied symmetrically, starting 12 hours before the leap second and ending 12 hours after, ensuring the total time accumulated remains consistent.
- Systems using Google's time service do not see the leap second event; they see a slightly slower clock rate, which prevents the 'time jump' that causes database transaction failures.
- The implementation relies on the NTP 'step' and 'slew' mechanisms, where the 'slew' mode is used to gradually adjust the clock frequency without discontinuities.
๐ฎ Future ImplicationsAI analysis grounded in cited sources
โณ Timeline
Weekly AI Recap
Read this week's curated digest of top AI events โ
๐Related Updates
AI-curated news aggregator. All content rights belong to original publishers.
Original source: ่ๅ
โ


