Disappointing results from ntpd - NTP

This is a discussion on Disappointing results from ntpd - NTP ; Any idea why I'm frequently seeing my system drift off by over 750 ms ? This system has been running ntpd for weeks without configuration changes. Below is from a few minutes after stuffing ntpdate down its throat (after stopping ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Disappointing results from ntpd

  1. Disappointing results from ntpd

    Any idea why I'm frequently seeing my system drift off by over 750
    ms ? This system has been running ntpd for weeks without configuration
    changes. Below is from a few minutes after stuffing ntpdate down its
    throat (after stopping and restarting ntpd):

    # ntpdate -q
    server 140.99.51.115, stratum 3, offset 0.274883, delay 0.08795
    server 72.233.76.194, stratum 3, offset 0.276196, delay 0.04480
    server 207.210.74.166, stratum 2, offset 0.276172, delay 0.06688
    server 66.250.45.2, stratum 2, offset 0.276772, delay 0.09192
    server 64.202.112.65, stratum 2, offset 0.281568, delay 0.07211
    10 Aug 09:47:41 ntpdate[16596]: adjust time server 207.210.74.166
    offset 0.276172 sec
    # ntpd --version
    ntpd - NTP daemon program - Ver. 4.2.4p4
    # lsb_release -d
    Description: Ubuntu 8.04
    # uname -a
    Linux linux1 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686
    GNU/Linux
    # cat /var/lib/ntp/ntp.drift
    -7.300
    # cat /etc/ntp.conf
    driftfile /var/lib/ntp/ntp.drift

    server 0.us.pool.ntp.org prefer minpoll 11 maxpoll 13
    server 1.us.pool.ntp.org minpoll 12 maxpoll 14
    server 2.us.pool.ntp.org minpoll 12 maxpoll 16
    server 3.us.pool.ntp.org minpoll 12 maxpoll 17

    restrict -4 default kod notrap nomodify nopeer noquery
    restrict -6 default kod notrap nomodify nopeer noquery
    restrict 127.0.0.1
    restrict ::1

  2. Re: Disappointing results from ntpd

    Daniel Norton wrote:
    > Any idea why I'm frequently seeing my system drift off by over 750
    > ms ? This system has been running ntpd for weeks without configuration
    > changes. Below is from a few minutes after stuffing ntpdate down its
    > throat (after stopping and restarting ntpd):


    That's the wrong sequence. ntpd must not be running when you set the
    time with ntpdate, and, unless you use the -b option, should not be
    started until the slew has completed.

    >
    > # ntpdate -q


    This does not set the time.

    >
    > server 0.us.pool.ntp.org prefer minpoll 11 maxpoll 13


    minpoll is too high. This will result in large excursions before the
    loop converges, and after transients. It may not even be possible to
    get convergence at all. minpoll should normally not be more than the
    default value of 6. Your minpoll is higher than the default maxpoll!

    Please try not specifying minpoll and maxpoll. If you still have a
    problem, come back.

  3. Re: Disappointing results from ntpd

    Daniel Norton wrote:
    > Any idea why I'm frequently seeing my system drift off by over 750
    > ms ? This system has been running ntpd for weeks without configuration
    > changes. Below is from a few minutes after stuffing ntpdate down its
    > throat (after stopping and restarting ntpd):
    >
    > # ntpdate -q
    > server 140.99.51.115, stratum 3, offset 0.274883, delay 0.08795
    > server 72.233.76.194, stratum 3, offset 0.276196, delay 0.04480
    > server 207.210.74.166, stratum 2, offset 0.276172, delay 0.06688
    > server 66.250.45.2, stratum 2, offset 0.276772, delay 0.09192
    > server 64.202.112.65, stratum 2, offset 0.281568, delay 0.07211
    > 10 Aug 09:47:41 ntpdate[16596]: adjust time server 207.210.74.166
    > offset 0.276172 sec
    > # ntpd --version
    > ntpd - NTP daemon program - Ver. 4.2.4p4
    > # lsb_release -d
    > Description: Ubuntu 8.04
    > # uname -a
    > Linux linux1 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686
    > GNU/Linux
    > # cat /var/lib/ntp/ntp.drift
    > -7.300
    > # cat /etc/ntp.conf
    > driftfile /var/lib/ntp/ntp.drift
    >
    > server 0.us.pool.ntp.org prefer minpoll 11 maxpoll 13
    > server 1.us.pool.ntp.org minpoll 12 maxpoll 14
    > server 2.us.pool.ntp.org minpoll 12 maxpoll 16
    > server 3.us.pool.ntp.org minpoll 12 maxpoll 17
    >
    > restrict -4 default kod notrap nomodify nopeer noquery
    > restrict -6 default kod notrap nomodify nopeer noquery
    > restrict 127.0.0.1
    > restrict ::1


    Lose the MINPOLL and MAXPOLL in your server statemetns!!!! The default
    values of 6 and 10, respectively, are optimal for all but the weirdest
    cases!

    Suggest using the "-g" option when starting ntpd. This will cause ntpd
    to set the correct time when it starts. Then wait until your system and
    ntpd have been running for at LEAST thirty minutes.

    Then issue "ntpq -p" and post the output!

  4. Re: Disappointing results from ntpd

    Daniel Norton wrote:
    > Any idea why I'm frequently seeing my system drift off by over 750
    > ms ? This system has been running ntpd for weeks without configuration
    > changes. Below is from a few minutes after stuffing ntpdate down its
    > throat (after stopping and restarting ntpd):
    >
    > # ntpdate -q
    > server 140.99.51.115, stratum 3, offset 0.274883, delay 0.08795
    > server 72.233.76.194, stratum 3, offset 0.276196, delay 0.04480
    > server 207.210.74.166, stratum 2, offset 0.276172, delay 0.06688
    > server 66.250.45.2, stratum 2, offset 0.276772, delay 0.09192
    > server 64.202.112.65, stratum 2, offset 0.281568, delay 0.07211
    > 10 Aug 09:47:41 ntpdate[16596]: adjust time server 207.210.74.166
    > offset 0.276172 sec
    > # ntpd --version
    > ntpd - NTP daemon program - Ver. 4.2.4p4
    > # lsb_release -d
    > Description: Ubuntu 8.04
    > # uname -a
    > Linux linux1 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686
    > GNU/Linux
    > # cat /var/lib/ntp/ntp.drift
    > -7.300
    > # cat /etc/ntp.conf
    > driftfile /var/lib/ntp/ntp.drift
    >
    > server 0.us.pool.ntp.org prefer minpoll 11 maxpoll 13
    > server 1.us.pool.ntp.org minpoll 12 maxpoll 14
    > server 2.us.pool.ntp.org minpoll 12 maxpoll 16
    > server 3.us.pool.ntp.org minpoll 12 maxpoll 17
    >
    > restrict -4 default kod notrap nomodify nopeer noquery
    > restrict -6 default kod notrap nomodify nopeer noquery
    > restrict 127.0.0.1
    > restrict ::1


    I missed one other point!

    Add the "iburst" keyword to each of your server statements. This will
    get you faster startup.

  5. Re: Disappointing results from ntpd

    Thanks. I was really over my head, apparently. It's working very well
    now and the system recently stabilized to within a few milliseconds,
    as evidenced by this chart that shows displacements of the last 500
    minutes:

    http://tinypic.com/view.php?pic=289cso6&s=4

    --
    Daniel

+ Reply to Thread