> -----Original Message----- > From: JP <j...@umantec.net> > Sent: Thursday, August 19, 2021 6:51 AM > To: linuxptp-users@lists.sourceforge.net > Subject: [Linuxptp-users] phc2sys quick start > > Hi, > > Apologies if this has been asked before. > > I'm trying to get phc2sys to sync CLOCK_REALTIME to a NIC as quickly as > possible. The best I can achieve is something between 50-100ms. > > After some experimentation I have come up with this incantation: > > phc2sys -s interface_name -O 0 -m -q -u 1 -R 64 -F > 0.000000001 > > and I get output like: > > phc2sys[1223293.766]: CLOCK_REALTIME rms > 469452396874593920 max 469452396874593920 freq -3997 +/- 0 delay > 4740 +/- 0 > phc2sys[1223293.782]: CLOCK_REALTIME rms > 469452396874593920 max 469452396874593920 freq -3997 +/- 0 delay > 4748 +/- 0 > phc2sys[1223293.798]: CLOCK_REALTIME rms > 469452396874593920 max 469452396874593920 freq -3997 +/- 0 delay > 4716 +/- 0 > phc2sys[1223293.814]: CLOCK_REALTIME rms > 469452396874593920 max 469452396874593920 freq -3997 +/- 0 delay > 4750 +/- 0 > phc2sys[1223293.830]: CLOCK_REALTIME rms > 469452396874593856 max 469452396874593856 freq -3621 +/- 0 delay > 4742 +/- 0 > phc2sys[1223293.846]: CLOCK_REALTIME rms 8 > max 8 freq -3613 +/- 0 delay 4751 +/- 0 > phc2sys[1223293.862]: CLOCK_REALTIME rms 5 > max 5 freq -3613 +/- 0 delay 4741 +/- 0 > phc2sys[1223293.878]: CLOCK_REALTIME rms 26 max > 26 freq -3591 +/- 0 delay 4695 +/- 0 > phc2sys[1223293.893]: CLOCK_REALTIME rms 9 > max 9 freq -3600 +/- 0 delay 4754 +/- 0 > phc2sys[1223293.909]: CLOCK_REALTIME rms 17 max > 17 freq -3623 +/- 0 delay 4694 +/- 0 > > The time delta between the first update and the first one with a decent > offset is 80ms in this case. Increasing -R doesn't seem to improve > things, and playing with the -N flag doesn't seem to help either. > > Is it realistic to expect better? If so, how can I optimise this > further? Why are more than 2 updates required for the first step > adjustment? > > Thanks, > > JP >
What device and driver are you using? What kernel version? There have been some fixes in this area in the past to improve the accuracy of the overall reads. You're wanting the offset to correct faster? I think that will heavily depend on the implementation of how frequency adjustments work, and whether or not the hardware supports atomic time adjustments. You could try a different servo or tune the pi servo options better too. Thanks, Jake > > > _______________________________________________ > Linuxptp-users mailing list > Linuxptp-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxptp-users _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users