Re: [chrony-users] Massive difference between NTP clocks and PHC

[ Thread Index | Date Index | More Archives ]

Thank you very much everyone.

I have almost figured it out.

The first problem was that there was a typo in the network address of the PTP port. PTP packets still arrived but it somehow made the system unhappy.

The second thing was that the configuration of ptp4l had some kind of a problem. After I started using linuxptp to configure both chrony and ptp4l thought it - it became much better.

I see that "linuxptp" has configured chrony to connect to PTP0 (shared memory segment) rather that PHC0 (direct connection to a PHC clock). I wonder if that makes any real difference.

So now it looks clean.

The only unknown is whether I should add some kind of static offset as while PTP measures the time at the card quite precisely, there is still some delay for getting time from that clock on the card over PCIE express and a shared memory segment and then to RTC clock. I guess it would be on a scale of microseconds.

With kind regards,
Denys Rtveliashvili

On Fri, Oct 14, 2016 at 10:38:00AM +0100, Denys Rtveliashvili wrote:
PHC0 is a clock on an Intel card running under igb driver.
The PTP port of the card is connected to a PTP-enabled Cisco Nexus switch,
which is connected to a PTP grandmaster. The same grandmaster in fact, which
is also a NTP source ntp-clock-1.

I would understand 36 secons of a difference (TIA vs GMT) or some
microseconds of a difference (some network and PCIE jitter). But a third of
a second is very strange.
Do you have any ideas?
Most likely the PHC is not synchronized. Is chronyd using the right
PHC? Maybe you have more than one.

By the way, for synchronization of on-the-NIC PTP clock I tried using ptp4l
in both software and hardware mode and that did not make any difference.
It needs to be in the hardware mode. Was ptp4l working correctly? Was
it reporting it's in the slave state? It could be a firewall issue.

In any case, I'd not recommend using the PHC refclock directly when
it's keeping time in TAI as you will need to reconfigure chronyd on
each leap second. A better way is to use ptp4l and phc2sys -E SHM to
provide a SHM refclock in UTC for chrony. With the timemaster program
from linuxptp it can be easily configured. It can prepare configuration
files for ptp4l, phc2sys and chronyd and start them with the right
options as needed.

Here is an article showing some examples with timemaster if you don't
mind reading some RHEL-specific stuff. It's the last third of the

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+