[chrony-users] Improving OS X start and wake from sleep performance

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


I use several old Macs and am not able to use the more recent versions of OS X.

I have recently experimented with Chrony on OS X 10.6.8 and am very impressed by its excellent time accuracy once it has been running for a few minutes. It is about 1,000 better than my default OS X which has a typical long term error of 30ms with a maximum error of about 100ms.

I am interested in trying to improve my Chrony start-up and sleep recovery performance. I would like to achieve:

1 - 100ms maximum error 10 seconds after Chrony start or wake from sleep

2 - 1ms maximum error 30 seconds after Chrony start or wake from sleep

3 - No time steps introduced by Chrony

Apart from the known incompatibility between Chrony and OS X sleep my default Chrony is not too far from this provided I use iburst and define a drift file.

I have tried several things to improve the performance such as running sntp before Chrony to set the cmos clock and running sntp at five minute intervals but both of these upset the stability of Chrony. The one thing that does improve performance is to restart Chrony upon waking. I do this with a small script in my Chrony launchd - see below. Typical performance is:

1 - 500ms error 33 seconds after Chrony start or wake from sleep

2 - 2ms error 35 seconds after Chrony start or wake from sleep

The time to permanently settle to less than 1ms error is often less than 40 seconds but on occasions it can take a few minutes more.

I would be very interested if anybody can say how I may be able improve on this performance other than by reducing minpoll.


chrony.conf:

pool pool.ntp.org iburst
driftfile /var/log/chrony/drift
logdir /var/log/chrony
logchange 0.001


launchd:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
<key>Label</key>
<string>chrony</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>
z=/tmp/chrony;
[[ -s $z ]] || { echo wake > $z; killall chronyd; /usr/local/sbin/chronyd -l /var/log/chrony/syslog.log; };
[[ $(tail -1 /Library/Logs/DirectoryService/DirectoryService.server.log) != *Sleep* ]] || { > $z; };
</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Library/Logs/DirectoryService/DirectoryService.server.log</string>
</array>
<key>ExitTimeOut</key>
<integer>4</integer>
<key>ThrottleInterval</key>
<integer>1</integer>
<key>RunAtLoad</key>
<true/>
<key>Nice</key>
<integer>-5</integer>
</dict>
</plist>


Neville Hillyer


--
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+ http://listengine.tuxfamily.org/