---
title: "How Precision Time Protocol is being deployed at Meta"
description: "Meta replaced NTP with Precision Time Protocol across its data centers to get nanosecond-level clock sync."
url: "https://swe.quest/articles/how-precision-time-protocol-is-being-deployed-at-meta-6d56b79aabe69525"
canonical: "https://engineering.fb.com/2022/11/21/production-engineering/precision-time-protocol-at-meta/"
source: "Meta Engineering"
published: "2022-11-21"
difficulty: "hard"
kind: "Case study"
reading_minutes: 27
tags: ["time-clocks","networking","datacenters","hardware","consistency"]
---

# How Precision Time Protocol is being deployed at Meta

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2022-11-21, 27 min read, Case study. Original: [https://engineering.fb.com/2022/11/21/production-engineering/precision-time-protocol-at-meta/](https://engineering.fb.com/2022/11/21/production-engineering/precision-time-protocol-at-meta/)

## Summary

Meta replaced NTP with Precision Time Protocol across its data centers to get nanosecond-level clock sync. Its main motivating use is commit-wait reads that bound clock uncertainty and avoid quorum reads, which ran roughly 100x better on PTP than on NTP in Meta's experiments. The design has three parts. The PTP rack has GNSS-over-fiber antennas and OCP Time Cards disciplined by oscillatord, with NIC clocks aligned via ts2phc and PPS to within ±50ns. The network uses unicast PTP with transparent clocks instead of boundary clocks. Clients are served by ptp4u, an open-source Go PTP server handling over 1 million clients per appliance, with c4u generating dynamic clock class and accuracy and Calnex Sentinel independently monitoring the setup.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Time & clocks](https://swe.quest/tags/time-clocks.md) (Distributed systems)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Datacenters](https://swe.quest/tags/datacenters.md) (Infrastructure)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Consistency models](https://swe.quest/tags/consistency.md) (Distributed systems)

## Prerequisites

- NTP and clock synchronization basics ([easy posts on Time & clocks](https://swe.quest/tags/time-clocks.md?difficulty=easy))
- distributed system consistency ([easy posts on Consistency models](https://swe.quest/tags/consistency.md?difficulty=easy))
- data center networking ([easy posts on Datacenters](https://swe.quest/tags/datacenters.md?difficulty=easy))

## Keywords

Precision Time Protocol, NTP, ptp4u, Time Card, Open Compute Project, oscillatord, ts2phc, Calnex Sentinel

## Related posts

- [PTP: Timing accuracy and precision for the future of computing](https://swe.quest/articles/ptp-timing-accuracy-and-precision-for-the-future-of-computing-7cb5bf24683b59a5.md): Meta Engineering · 2022-11-21 · Easy · 8 min read · Time & clocks, Datacenters, Networking, Open source
  Meta is rolling out Precision Time Protocol (PTP) across its data centers to replace NTP, moving clock synchronization precision from milliseconds to nanoseconds.
- [Simple Precision Time Protocol at Meta](https://swe.quest/articles/simple-precision-time-protocol-at-meta-1f4dfeb134554941.md): Meta Engineering · 2024-02-07 · Hard · 9 min read · Time & clocks, Networking, Datacenters, Performance engineering
  Simple Precision Time Protocol (SPTP) replaces the subscription-based unicast PTPv2 exchange with a stateless, client-driven three-packet exchange: a delay request (flagged with PTP profile Specific 1), a sync carrying T4, and a followup/announce carrying T1 and CF1.
- [How Precision Time Protocol handles leap seconds](https://swe.quest/articles/how-precision-time-protocol-handles-leap-seconds-7f6fcf3729d9faf4.md): Meta Engineering · 2025-02-03 · Medium · 3 min read · Time & clocks, Datacenters, Distributed systems
  Meta handles leap seconds for its nanosecond-precision PTP service by self-smearing inside the fbclock library, which shifts its returned Window of Uncertainty {earliest\_ns, latest\_ns} by 1 ns every 62.5 µs.
- [Open-sourcing a more precise time appliance](https://swe.quest/articles/open-sourcing-a-more-precise-time-appliance-d4216f5f1f5059e9.md): Meta Engineering · 2021-08-11 · Hard · 12 min read · Time & clocks, Hardware, Networking, Open source, Linux
  Meta built and open-sourced the Time Card, a PCIe card combining a multiband GNSS receiver, a miniaturized atomic clock and an FPGA time engine that turns a commodity x86 server with a hardware-timestamping NIC into an NTP/PTP Stratum 1 time appliance.
- [It’s time to leave the leap second in the past](https://swe.quest/articles/it-s-time-to-leave-the-leap-second-in-the-past-9e11ae3896edcf86.md): Meta Engineering · 2022-07-25 · Medium · 6 min read · Time & clocks, Distributed systems, Resilience
  Leap seconds do more harm than good for modern computing, and Meta backs an industry push to freeze them at the current 27.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
