Live data from Hacker News

How Precision Time Protocol is being deployed at Meta

engineering.fb.com

1–10 of 104 posts

Re: How Precision Time Protocol is being deployed at Meta

#3
It is not accurate to say that PTP is a predecessor to NTP.

You need both.

PTP synchronizes clocks to a ridiculous precision, like down to nanoseconds. To do that, it uses support in the ethernet hardware. Hardware adds precision stamps to the PTP-related ethernet frames, so that the time calculations are free of jitters induced by the higher network stacks.

A cool thing is that PTP-aware routers/switches can actually rewrite the timestamps in PTP packets to subtract their own propagation delay accurately.

Something in the network has to use NTP, if it is important for the devices to have the correct calendar date and time; you don't use PTP over the Internet to get time from a remote server.

The real-time clock being synchronized isn't even the system clock in the first place, but a high resolution RTC that is in the network adapters and switches.

As an additional utility on top of the PTP stack, there is the possibility of synchronizing the host system's clock with the help of PTP.

PTP is used for things like generating precise signals in certain applications. E.g. Some devices that have PTP support can be programmed to generate periodic pulses which are clocked by the sychronized real-time clock. With PTP, two such signals from separate devices on the network can align very precisely. Such an application doesn't care about the time of day, just that the signals are synced.

Re: How Precision Time Protocol is being deployed at Meta

#5
post #2

This is incredible. If I knew I'd be working on things like this (as opposed to optimizing ad revenue or "user engagement" by A/B testing button copy), I'd possibly consider working at Meta.

There's other places that are working on this although they probably don't pay as much as Meta. CERN and a few other european physics projects having been using this to create the white rabbit project over the last decade or so ( https://en.wikipedia.org/wiki/White_Rabbit_Project ).

Re: How Precision Time Protocol is being deployed at Meta

#6
Why do so many tech companies seem to be releasing “secret sauce” for free lately? I see a lot of posts lately detailing how inner production systems work at large companies, and while I’m grateful, I’m curious why the higher ups think it’s worthwhile to release this information.

Re: How Precision Time Protocol is being deployed at Meta

#7
So they state:

> One could argue that we don’t really need PTP for that. NTP will do just fine. Well, we thought that too. But experiments we ran comparing our state-of-the-art NTP implementation and an early version of PTP showed a roughly 100x performance difference:

While I'm not necessarily against more accuracy/precision, what problems specifically are experiencing? They do mention some use cases of course:

> There are several additional use cases, including event tracing, cache invalidation, privacy violation detection improvements, latency compensation in the metaverse, and simultaneous execution in AI, many of which will greatly reduce hardware capacity requirements. This will keep us busy for years ahead.

But given that NTP (either ntpd or chrony) tends to give me an estimated error of around (tens of) 1e-6 seconds, and PTP can get down to 1e-9 seconds, I'm not sure how many data centre applications need that level of accuracy.

> We believe PTP will become the standard for keeping time in computer networks in the coming decades.

Given the special hardware needed for the grand master clock to get down to nanosecond time scales, I'm doubtful this will be used in most data centres of most corporate networks. Adm. Grace Hopper elegantly illustrates 'how long' a nanosecond is:

* https://www.youtube.com/watch?v=9eyFDBPk4Yw

How many things need to worry the latency of signal travelling ~300mm?

Re: How Precision Time Protocol is being deployed at Meta

#8

Why do so many tech companies seem to be releasing “secret sauce” for free lately? I see a lot of posts lately detailing how inner production systems work at large companies, and while I’m grateful, I’m curious why the higher ups think it’s worthwhile to release this information.

Facebook in particular is very open about its data center, see https://www.opencompute.org/

See “Commoditize Your Complement” - https://www.joelonsoftware.com/2002/06/12/strategy-letter-v/ , https://www.gwern.net/Complement

Re: How Precision Time Protocol is being deployed at Meta

#9

Why do so many tech companies seem to be releasing “secret sauce” for free lately? I see a lot of posts lately detailing how inner production systems work at large companies, and while I’m grateful, I’m curious why the higher ups think it’s worthwhile to release this information.

> Why do so many tech companies seem to be releasing “secret sauce” for free lately?

Is it really their "special sauce" though? Do these types of releases actually give away how these companies make money?

In this particular case, telling the world how to get to nanosecond levels of timekeeping doesn't really help any competitors take away Metabook's revenues or profits.

Re: How Precision Time Protocol is being deployed at Meta

#10
post #2

This is incredible. If I knew I'd be working on things like this (as opposed to optimizing ad revenue or "user engagement" by A/B testing button copy), I'd possibly consider working at Meta.

If this is the only thing stopping you, you should apply and tell the recruiter you would like to work in infra. People that don't want to work on product stuff don't get "roped into it", I know people who have worked at Meta/FB for years and have never touched user-facing code or ads stuff.
Post reply on HN