Mains frequency has nothing to do with it. Think about it for a second, these chips typically run on 5V or 3.3V DC. How in the world would the mains frequency have any influence here? This could only possibly have an influence if the analog clock's motor is directly (or through a transformer) fed with 50 (or 60) Hz AC power.Mains powered clocks have a better long term stability as long as the average of the mains frequency is maintained.
I think some digital mains clocks and timers pick up the reference frequency from the mains instead of using a crystal oscillator. More likely to provide long term accuracy than a cheap oscillator circuit.Mains frequency has nothing to do with it. Think about it for a second, these chips typically run on 5V or 3.3V DC. How in the world would the mains frequency have any influence here? This could only possibly have an influence if the analog clock's motor is directly (or through a transformer) fed with 50 (or 60) Hz AC power.
Nope. Requires a lot more electronics (thus more expensive) than generating a clock from a crystal. Some clock circuits have builtin oscillators, those are definitely not as accurate as crystals but they're not depending on the mains frequency (chips are fed with DC power).I think some digital mains clocks and timers pick up the reference frequency from the mains instead of using a crystal oscillator.
Yes, that is how it is done. One example is at the bottom of http://www.decodesystems.com/clock-ics.html with the IC named 5316. This ships use the down transformed mains for LED multiplexing and for the internal clock. In the past Toshiba has had a lot of those chips in production. Today it is difficult to find data sheets.How in the world would the mains frequecy have any influence here? This could only possibly have an influence if the analog clock's motor is directly (or through a transformer) fed with 50 (or 60) Hz AC power.
Electronics engineer here. Picking up mains frequency is very inexpensive to do - especially if the downstream device is already powered by mains. There are a couple of different ways of doing it - some more elegant than others - but depending on the design of the power supply you actually don't need any additional components at all. In fact, the creme-de-la-creme of the cheapest possible consumer electronics featuring clock capabilities are built using mains frequency rather than an oscillator (be it crystal or otherwise) because it is the cheapest thing you can do.Nope. Requires a lot more electronics (thus more expensive) than generating a clock from a crystal. Some clock circuits have builtin oscillators, those are definitely not as accurate as crystals but they're not depending on the mains frequency (chips are fed with DC power).
As long as the network doesn't get saturated...Why not run an "ntp-client". The offset will be one tenth of a second even after running a year.
Local system status:
3:01AM up 9 days, 20:49, 17 users, load averages: 25.68, 18.57, 16.46
NTP status:
remote refid st t when poll reach delay offset jitter
==============================================================================
+2a01:4f8:221:3b 130.149.17.21 2 u 923 1024 377 24.379 -1.153 3.780
+2001:638:504:20 129.70.137.82 2 u 536 1024 377 34.931 -1.498 9.397
+2a01:4f8:141:28 192.171.1.150 2 u 606 1024 377 27.219 -0.664 4.372
+2a03:4000:6:f07 130.149.17.8 2 u 205 1024 377 23.988 -1.559 2.328
+2a03:4000:40:36 131.188.3.223 2 u 258 1024 377 24.842 +0.216 1.825
+2001:4ba0:ffa4: 124.216.164.14 2 u 325 1024 377 23.287 -0.128 2.127
*2a01:4f8:201:41 36.224.68.195 2 u 327 1024 377 24.932 -1.220 2.858
#2a01:238:4244:b 131.188.3.220 2 u 330 1024 377 32.624 +1.908 1.713
[...]
Local system status:
3:02AM up 10 days, 20:50, 21 users, load averages: 24.33, 17.72, 15.19
NTP status:
remote refid st t when poll reach delay offset jitter
==============================================================================
+2a01:4f8:221:3b 130.149.17.21 2 u - 1024 377 27.134 -101.40 132.278
+2001:638:504:20 129.70.137.82 2 u 795 1024 377 38.267 -98.793 108.638
+2a01:4f8:141:28 192.171.1.150 2 u 726 1024 377 29.503 -98.080 140.123
+2a03:4000:6:f07 192.53.103.108 2 u 189 1024 377 24.820 -104.51 101.263
+2a03:4000:40:36 193.204.114.233 2 u 512 1024 377 24.683 -97.607 90.782
+2001:4ba0:ffa4: 237.17.204.95 2 u 313 1024 377 23.709 -103.14 134.917
*2a01:4f8:201:41 36.224.68.195 2 u 544 1024 377 31.457 -95.471 105.490
#2a01:238:4244:b 40.33.41.76 2 u 449 1024 377 35.521 -92.758 135.705
Is the required correction method (a significant jump) going to cause any undesirable consequences?I don't want the bulk of a service. I can live with 4 seconds drift a week.
ntpdate -b 162.159.200.123
), and then slew the time every hour (ntpdate 162.159.200.123
) from cron. The hourly interval generally ensures that the clock can be slewed and not stepped.The first set of numbers are very good, you have single-digit milliseconds jitter. And the second set is not terrible either; being accurate to withim 130ms is pretty good. Clearly, the correct fix is to make the network not overload.As long as the network doesn't get saturated...4 377 35.521 -92.758 135.705[/code]
Using make over NFS really points out how badly designed the original NFS protocol was. Sadly, that makes sense: It was originally designed as a quick hack to build networks of diskless machines. At the time it was designed (late 70s), our knowledge of distributed systems was in its infancy; for example, Leslie Lamport's paper about clocks was from that time, and his consensus paper (Paxos) came 10 years later. The sad thing is that the VAXcluster protocol had solved many of the same problems; I don't know why this didn't reach a wider audience.Using make and NFS I have a low tolerance for clock drift.
I have a low tolerance for NFS!Using make and NFS I have a low tolerance for clock drift.
$ ps ax -o args,vsz,rss | grep -i ntp
/usr/sbin/ntpd - 18884 5472
$ ps ax -o args,vsz,rss | grep -i ntp
ntpd: ntp engine 1212 2988
ntpd: dns engine 1060 2756
/usr/sbin/ntpd 1124 1644
# ps ax -o args,vsz,rss | grep -i ntp
/usr/sbin/ntpd -p /var/run/ 73984 8556
I just recently watched a presentation on Google Spanner. They use atomic clocks in the Paxos implementation they rely on for global strong consistency....Leslie Lamport's paper about clocks was from that time, and his consensus paper (Paxos) came 10 years later...
We had a VAX cluster in one of the jobs I had early in my career. That thing was subtle and quick to anger.The sad thing is that the VAXcluster protocol had solved many of the same problems; I don't know why this didn't reach a wider audience.
Supposedly ntpdate(8) is deprecated and will be removed Real Soon Now. Running ntpd(8) with argumentsntpdate(8) suggests that a low impact method to keep time in good sync without running an NTP client is to set the time correctly at boot (ntpdate -b 162.159.200.123
), and then slew the time every hour (ntpdate 162.159.200.123
) from cron. The hourly interval generally ensures that the clock can be slewed and not stepped.
-gq
should be functionally equivalent. Slew the time is exactly what ntpd(8) does.Yes, and that is the difficult part. 130ms is rather bad - there is some spec that VoIP demands 40ms, and in any case trying to read tcpdumps across the cloud is impractical that way.The first set of numbers are very good, you have single-digit milliseconds jitter. And the second set is not terrible either; being accurate to withim 130ms is pretty good. Clearly, the correct fix is to make the network not overload.
remote refid st t when poll reach delay offset jitter
==============================================================================
+ntp3.linocomm.n 130.149.17.21 2 u 477 1024 377 33.635 +0.642 5.954
*stratum2-4.NTP. 129.70.137.82 2 u 959 1024 377 47.236 +1.827 2.566
+2a01:4f8:141:28 131.188.3.223 2 u 467 1024 377 37.507 +2.310 1.734
+mail.rleh.de 130.149.17.8 2 u 971 1024 377 33.672 +1.545 2.737
#daphne.ea1145.o 131.188.3.223 2 u 151 1024 377 33.584 +1.635 1.635
+2001:41d0:700:1 131.188.3.222 2 u 648 1024 377 30.743 +1.408 1.404
-srv.hueske-edv. 36.224.68.195 2 u 702 1024 377 39.281 +3.483 2.685
#ns2.madavi.de 131.188.3.220 2 u 555 1024 377 39.299 +2.870 4.666
net.inet.tcp.cc.algorithm="vegas"
net.inet.tcp.cc.vegas.beta="14"
net.inet.tcp.cc.vegas.alpha="8"
Both ntpdate and ntpd will step time if the time offset exceeds the step threshold, which is 128 ms by default, and I was just quoting ntpdate(8) suggesting that running ntpdate hourly would provide "precise enough timekeeping to avoid stepping the clock".Slew the time is exactly what ntpd(8) does.