You are here: Foswiki>Cosmo Web>RadioT4>RadioT4TimingTenMs (revision 2)EditAttach
<< WebHome


Can ntp be used to keep time accurate to within 10ms ?

Initial analysis

  • It seems that a default debian/etch install: aptitude install ntp ntpdate gives a good default configuration that indirectly contacts a large pool of "stratum 1" ntp servers, e.g. icm.edu.pl which seems to have an atomic clock, and that the precision should be sufficient
    • ignore ntp-server, ntp-simple
    • optionally install ntp-doc
  • By installing ntp, the daemon ntpd will automatically be started. Do not try to run ntpdate by hand or with cron, since it should be disabled anyway, since the daemon is running.
    • There is a daily cron job installed with the daemon package (ntp), but all it does is rotate the log files (instead of logrotate :P). You can edit /etc/cron.daily/ntp in order to keep a much longer backlog of logs - the default is just the last 7 days.
  • The typical polling interval of remote ntp servers appears to be about 15-20 minutes on 3 different machines.
  • The absolute offsets were a little less than 10ms for the last 7 days on all 3 machines.
  • The ntp algorithm in general seems to be quite intelligent, using heuristic models to overcome various real-time problems such as occasional network congestion, individual server failure, and the hardware characteristics of localhost.

  • 2008.10.20 to 2008.10.28 on simulation machine: ntp_offset_20081020_20081028_bell.png: ntp_offset_20081020_20081028_bell.png

possible parameters to play with

config files

  • /etc/defaults/ntp
    • Maybe add -N To the extent permitted by the operating system, run the ntpd at the highest priority. ?
  • /etc/ntp.conf
    • minpoll, maxpoll - increase frequency of "polling" servers?
      • replace server [0123].debian.pool.ntp.org iburst by server [0123].debian.pool.ntp.org iburst minpoll 6 maxpoll 8 = 1 to 4 minutes instead of the default 1 to 17 minutes ?
        • initial 5 hours of trying minpoll 6 maxpoll 8 suggest that this pushes offsets down to about 1ms: ntp_peerstats_offset_20081029_5h_maxpoll8.png

source files - recompile

  • include/ntp.h
    • Clock filter algorithm tuning parameters ?
    • Selection algorithm tuning parameters ?
      • decrease: #define MINDISPERSE .005 /* min dispersion increment */ ?

TODO

Does this 10ms limit remain valid during intense simulated telescope usage?

  • Monitor this!

Check that all is OK after aptitude update/upgrade

-- BoudRoukema - 28 Oct 2008
Topic attachments
I Attachment Action Size Date Who Comment
ntp_offset_20081020_20081028_bell.pngpng ntp_offset_20081020_20081028_bell.png manage 2.0 K 28 Oct 2008 - 22:56 BoudRoukema  
ntp_peerstats_offset_20081029_5h_maxpoll8.pngpng ntp_peerstats_offset_20081029_5h_maxpoll8.png manage 1.0 K 29 Oct 2008 - 15:51 BoudRoukema this is just a very short sample, it should be replaced later on
Edit | Attach | Print version | History: r15 | r4 < r3 < r2 < r1 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r2 - 29 Oct 2008, BoudRoukema
 
This site is powered by FoswikiCopyright © CC-BY-SA by the contributing authors. All material on this collaboration platform is copyrighted under CC-BY-SA by the contributing authors unless otherwise noted.
Ideas, requests, problems regarding Foswiki? Send feedback