Re: [ntp:questions] chrony as a server
William Unruh un...@invalid.ca wrote: In the specific case of PPS I don't see any advantage. Well, no. Lichvar did some tests with PPS and found that chrony disciplined the clock much better than did ntpd (factors of over 10). I think that is a difference. I am seeing the same thing on our PPS synchronized servers. When the temperature changes, the swing observed in time offset is about a factor of 10 less with chrony than with ntpd. With ntpd the excursions are up to about 3us, with chrony up to about 300ns. With chrony there is just a random offset sometimes, with ntpd the derivative of the temperature can clearly be seen in the offset plots. And I have not yet configured the temperature compensation in chrony. (first have to figure out how to calibrate it) ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On Wed, Feb 18, 2015 at 10:00:08PM -0500, Paul wrote: On Wed, Feb 18, 2015 at 8:53 PM, William Unruh un...@invalid.ca wrote: On 2015-02-19, Paul tik-...@bodosom.net wrote: In the specific case of PPS I don't see any advantage. Well, no. Lichvar did some tests with PPS and found that chrony disciplined the clock much better than did ntpd (factors of over 10). I think that is a difference. Do you have a link to that? The graphs I saw were all for (simulated?) clients. But it's been a while. It could be this post http://lists.ntp.org/pipermail/questions/2010-March/026157.html My update to that after the years would be that 3x is not really the minimum difference. If the clock is stable enough, they can perform similarly. A difference is not necessarily an advantage (I said advantage not difference) but I would have assumed that https://github.com/mlichvar/chrony/blob/master/README was correct which says one microsecond* (I assume offset but it's unclear) but let's go with 10x NTPd. On my machines NTPd offsets and jitter can be sub-microsecond. So the target is O(10) nanoseconds? I don't think 10 nanoseconds is possible with 1us jitter and normal unstabilized clock. When using a PTP clock on PCIe as a reference it can get quite close though, see this graph from stats collected over a few hours: https://mlichvar.fedorapeople.org/chrony/refclock_phc0.png -- Miroslav Lichvar ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On 19/02/2015 18:09, Paul wrote: On Thu, Feb 19, 2015 at 12:35 PM, David Taylor david-tay...@blueyonder.co.uk.invalid wrote: Accurate and current documentation is both essential and invaluable for any project! Well then under no circumstances should you read the ntp faq/howto at http://www.ntp.org/ntpfaq/NTP-a-faq.htm. Yes, what with me also knowing very little Linux, I ended up writing my own as built rather than as designed guides, such as: http://www.satsignal.eu/ntp/Raspberry-Pi-quickstart.html http://www.satsignal.eu/ntp/setup.html with much help from the folk here! -- Cheers, David Web: http://www.satsignal.eu ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On Thu, Feb 19, 2015 at 10:05:45AM +, Rob wrote: We have systems in places that are not temperature controlled and then chrony is much better. I am looking for the best way to find the values to use in the tempcomp configuration directive. What resolution does the sensor have? Don't expect good results with 1C or 0.5C resolution that sensors on mainboards typically have. Ideally there would be a program that analyzes a log of momentary temperature and frequency values to find the coefficients, but how is such a logfile even generated? Should I enter a tempcomp line with zero coefficients and then use the tempcomp logging? Yes, you can use that or you can collect data from the sensor file with a while true; do echo $(date +'%s'; cat /sys/...); sleep 1; done script independently from chronyd. After collecting enough data over a wide range of temperature you need to pair the temperature values with frequency from the tracking log and find the coefficients for the quadratic function, or (with 2.0-pre1) it's easier to create a file containing list of (temperature, correction) points for the second form of the tempcomp configuration. For example, you could divide temperature in 0.1C intervals and use mean frequency offset as the correction. Not sure if it needs to be negated or not, I always forget. I agree it would be nice to have a script that would automate this process. -- Miroslav Lichvar ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Miroslav Lichvar mlich...@redhat.com wrote: My update to that after the years would be that 3x is not really the minimum difference. If the clock is stable enough, they can perform similarly. Indeed when a system is in a reasonably constant temperature and the clock happens to be good, ntpd performs similar to chrony. We have systems in places that are not temperature controlled and then chrony is much better. I am looking for the best way to find the values to use in the tempcomp configuration directive. Ideally there would be a program that analyzes a log of momentary temperature and frequency values to find the coefficients, but how is such a logfile even generated? Should I enter a tempcomp line with zero coefficients and then use the tempcomp logging? ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On 19/02/2015 01:24, Paul wrote: [] Chrony (in general) pros and cons: http://chrony.tuxfamily.org/manual.html#Other-time-synchronisation-packages [] ... whwre it says: Things chronyd can do that ntpd can’t: chronyd provides support for isolated networks whether the only method of time correction is manual entry (e.g. by the administrator looking at a clock). Does not NTP's orphan mode and local clock driver provide this? -- Cheers, David Web: http://www.satsignal.eu ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Miroslav Lichvar mlich...@redhat.com wrote: On Thu, Feb 19, 2015 at 10:05:45AM +, Rob wrote: We have systems in places that are not temperature controlled and then chrony is much better. I am looking for the best way to find the values to use in the tempcomp configuration directive. What resolution does the sensor have? Don't expect good results with 1C or 0.5C resolution that sensors on mainboards typically have. I am still finding out what sensor is best to use, we do have a room temperature sensor that has .1C resolution and is readable via snmp, and there are the usual sensors for board- and inlet air temperature. (and of course CPU temperature) It does not matter if it is only a course indication, the room temperature varies over a -10 .. 50C range (don't ask...) and a 1C resolution is not bad relative to that. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On Thu, Feb 19, 2015 at 02:42:39PM +, Rob wrote: Ok but of course we are using PPS and a 16 second polling interval. (or maybe the PPS refclock polls even faster although it displays 4 as the poll interval indicator) You may want to try a shorter polling interval and see if the swings are still there. If poll 3 doesn't help, you can try even shorter, but normal timekeeping when the temperature isn't changing rapidly will likely get worse. The default PPS refclock driver poll is 0 (1s), this be changed too if the PPS signal has a higher rate. Some GPS units seems to have this configurable (e.g. ublox NEO-6T). -- Miroslav Lichvar ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On Thu, Feb 19, 2015 at 9:42 AM, Rob nom...@example.com wrote: Ok but of course we are using PPS and a 16 second polling interval. Use eight unless your system is broken in which replace it and then use eight. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On Thu, Feb 19, 2015 at 12:48:46PM +, Rob wrote: I am still finding out what sensor is best to use, we do have a room temperature sensor that has .1C resolution and is readable via snmp, and there are the usual sensors for board- and inlet air temperature. (and of course CPU temperature) It does not matter if it is only a course indication, the room temperature varies over a -10 .. 50C range (don't ask...) and a 1C resolution is not bad relative to that. In my tests using a sensor with 1C resolution it was barely useful with NTP sources and 1024s polling interval. If the sensitivity is around 0.1 ppm per degree, 1C resolution means the compensation jumping the frequency in 0.1ppm steps. That's a lot, especially if you compare it to the tracking skew with a refclock. I'd probably try a shorter polling interval first and maybe get a PPS with higher rate if possible to minimize the swings due to temperature changes. -- Miroslav Lichvar ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
I admit that I have not looked at the chrony code/doc and do not use it as it when I did take a look, it had no ref clock support so I don’t know what the objective is here. That said, from the current discussion I have a feeling that integrating temperature data into the clock control loop is not the right use for that info. Where frequency stability is paramount as in quartz/rubidium frequency standards which have stability 2 or more orders of magnitudes better than any cpu system clock, none of those use temperature data in their control loops and for good reason. The only instance where it could possibly be useful, but where there are no commercial implementation AFAIK would be where a 1PPS ref was lost. Use temperature date by all means, but use it to control the environment and not the loop, for what you are measuring with the clock offset is the result of the total perturbations on the system, temperature being the most important in the short term. With a modern cpu, chip temperature, for which you can get data has extremely erratic and rapid swings according to load. Trying to follow those is unlikely be productive as you have recognized . Ceux qui sont prêts à abandonner une liberté essentielle pour obtenir une petite et provisoire sécurité, ne méritent ni liberté ni sécurité. Benjimin Franklin Le 19 févr. 2015 à 15:18, Miroslav Lichvar mlich...@redhat.com a écrit : On Thu, Feb 19, 2015 at 12:48:46PM +, Rob wrote: I am still finding out what sensor is best to use, we do have a room temperature sensor that has .1C resolution and is readable via snmp, and there are the usual sensors for board- and inlet air temperature. (and of course CPU temperature) It does not matter if it is only a course indication, the room temperature varies over a -10 .. 50C range (don't ask...) and a 1C resolution is not bad relative to that. In my tests using a sensor with 1C resolution it was barely useful with NTP sources and 1024s polling interval. If the sensitivity is around 0.1 ppm per degree, 1C resolution means the compensation jumping the frequency in 0.1ppm steps. That's a lot, especially if you compare it to the tracking skew with a refclock. I'd probably try a shorter polling interval first and maybe get a PPS with higher rate if possible to minimize the swings due to temperature changes. -- Miroslav Lichvar ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On Thu, Feb 19, 2015 at 6:16 PM, Harlan Stenn st...@ntp.org wrote: While that document is old and unmaintained So put an appropriate note at the top of it and on the link to it from the WebHome page. No one that stumbles onto it is going to find any gems. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Miroslav Lichvar mlich...@redhat.com wrote: On Thu, Feb 19, 2015 at 02:42:39PM +, Rob wrote: Ok but of course we are using PPS and a 16 second polling interval. (or maybe the PPS refclock polls even faster although it displays 4 as the poll interval indicator) You may want to try a shorter polling interval and see if the swings are still there. If poll 3 doesn't help, you can try even shorter, but normal timekeeping when the temperature isn't changing rapidly will likely get worse. Well, as it is now we see no real swings as with ntpd, but more like random spikes in each direction. It was only my guess that these could be lessened when chrony knows about clock rate changes beforehand. The excursions are about ten times less than the swings in ntpd. The default PPS refclock driver poll is 0 (1s), this be changed too if the PPS signal has a higher rate. Some GPS units seems to have this configurable (e.g. ublox NEO-6T). The PPS really is 1 PPS, but I am not sure if chrony is evaluating each pulse separately or is averaging 16 pulse measurements into one clock adjustment group. (as it says poll 4) ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Miroslav Lichvar mlich...@redhat.com wrote: On Thu, Feb 19, 2015 at 12:48:46PM +, Rob wrote: I am still finding out what sensor is best to use, we do have a room temperature sensor that has .1C resolution and is readable via snmp, and there are the usual sensors for board- and inlet air temperature. (and of course CPU temperature) It does not matter if it is only a course indication, the room temperature varies over a -10 .. 50C range (don't ask...) and a 1C resolution is not bad relative to that. In my tests using a sensor with 1C resolution it was barely useful with NTP sources and 1024s polling interval. If the sensitivity is around 0.1 ppm per degree, 1C resolution means the compensation jumping the frequency in 0.1ppm steps. That's a lot, especially if you compare it to the tracking skew with a refclock. Ok but of course we are using PPS and a 16 second polling interval. (or maybe the PPS refclock polls even faster although it displays 4 as the poll interval indicator) ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On Thu, Feb 19, 2015 at 5:34 AM, David Taylor david-tay...@blueyonder.co.uk.invalid wrote: Does not NTP's orphan mode and local clock driver provide this? Refclock 1 (LOCAL/LOCL) is deprecated and I believe as of a recent release it's useless* but Orphan mode is intended to replace the local clock driver. It provides a single simulated UTC source Note that I provided a link not any commentary on the correctness of the claims at that link. It would be nice if the Chrony docs told the truth but likewise the NTP docs. *Previously LOCL+PPS was a useful configuration, now you need (or should) use kernel PPS. ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
On 19/02/2015 14:20, Paul wrote: On Thu, Feb 19, 2015 at 5:34 AM, David Taylor david-tay...@blueyonder.co.uk.invalid wrote: Does not NTP's orphan mode and local clock driver provide this? Refclock 1 (LOCAL/LOCL) is deprecated and I believe as of a recent release it's useless* but Orphan mode is intended to replace the local clock driver. It provides a single simulated UTC source Note that I provided a link not any commentary on the correctness of the claims at that link. It would be nice if the Chrony docs told the truth but likewise the NTP docs. *Previously LOCL+PPS was a useful configuration, now you need (or should) use kernel PPS. Thanks for the update, Paul. It's something I've never used so please excuse me for confusing the two, and not being quite up-to-date with this. Accurate and current documentation is both essential and invaluable for any project! -- Cheers, David Web: http://www.satsignal.eu ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Would the temperature monitoring script and coefficient generation/processsing stuff be a good GSoC project? If so, if somebody wants to mentor this please add it as an idea at http://support.ntp.org/bin/view/Dev/GSoCProjectIdeas H ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions
Re: [ntp:questions] chrony as a server
Paul writes: On Thu, Feb 19, 2015 at 12:35 PM, David Taylor david-tay...@blueyonder.co.uk.invalid wrote: Accurate and current documentation is both essential and invaluable for any project! Well then under no circumstances should you read the ntp faq/howto at http://www.ntp.org/ntpfaq/NTP-a-faq.htm. While that document is old and unmaintained, I've had dreams of somebody going over it to find any remaining gems and get that content added to support.ntp.org so the old FAQ can be removed. Hasn't happened yet. H ___ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions