Time offset / Jitter under FreeBSD - NTP

This is a discussion on Time offset / Jitter under FreeBSD - NTP ; I've been experimenting with running a timeserver under FreeBSD. Basically, I'm trying to build a dedicated box as a time server. I am currently running the Meinberg port under windows, and that seems stable. I installed FreeBSD on a drive, ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Time offset / Jitter under FreeBSD

  1. Time offset / Jitter under FreeBSD

    I've been experimenting with running a timeserver under FreeBSD. Basically,
    I'm trying to build a dedicated box as a time server. I am currently running
    the Meinberg port under windows, and that seems stable.

    I installed FreeBSD on a drive, and booted my windows machine from it. The
    FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    jitter, also. Remember, the same machine running windows is generally sub
    millisecond - http://www.pool.ntp.org/scores/74.181.17.243/log offset.

    So.... I tried two different other computers after this. One was a Abit AMD
    something or other. The other is a VIA Mini-ITX. Similar results.

    In both the windows and FreeBSD cases, I verified the offset under FreeBSD,
    and the lack of offset under windows on the same machine was real by listing
    the IP of the machine with a list of other time servers including the
    NTS-100 on the ntp client on my laptop. The computer looked good under
    windows, and was way off from the rest of the pack when it was running
    FreeBSD.

    Is there some issue with, or some trick that needs to be played with the
    ntpd distributed with FreeBSD 6.2? I did another install of FreeBSD, and the
    results were the same. ntp.conf simply contains four servers - the same as I
    normally use. One of them is a local NTS-100.



  2. Re: Time offset / Jitter under FreeBSD

    Bob wrote:
    > I've been experimenting with running a timeserver under FreeBSD. Basically,
    > I'm trying to build a dedicated box as a time server. I am currently running
    > the Meinberg port under windows, and that seems stable.
    >
    > I installed FreeBSD on a drive, and booted my windows machine from it. The
    > FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    > jitter, also. Remember, the same machine running windows is generally sub
    > millisecond - http://www.pool.ntp.org/scores/74.181.17.243/log offset.
    >
    > So.... I tried two different other computers after this. One was a Abit AMD
    > something or other. The other is a VIA Mini-ITX. Similar results.
    >
    > In both the windows and FreeBSD cases, I verified the offset under FreeBSD,
    > and the lack of offset under windows on the same machine was real by listing
    > the IP of the machine with a list of other time servers including the
    > NTS-100 on the ntp client on my laptop. The computer looked good under
    > windows, and was way off from the rest of the pack when it was running
    > FreeBSD.
    >
    > Is there some issue with, or some trick that needs to be played with the
    > ntpd distributed with FreeBSD 6.2? I did another install of FreeBSD, and the
    > results were the same. ntp.conf simply contains four servers - the same as I
    > normally use. One of them is a local NTS-100.
    >
    >


    Have you tried building and installing the Reference Implementation of
    ntpd? Source is available at ntp.org.

    There is something out in BSD Land called "Open NTP" or something very
    similar. When I last heard of it, the authors hadn't yet managed to
    "get it right"!


  3. Re: Time offset / Jitter under FreeBSD

    In article ,
    Bob wrote:

    >I installed FreeBSD on a drive, and booted my windows machine from it. The
    >FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    >jitter, also.


    How long did you leave it running? What drift value was reported?

    My stratum-0, running FreeBSD 6.2, consistently reports offsets to
    other stratum-0s within +/- 5 ms, and to its refclock within a couple
    of microseconds with the nanokernel and kernel PPS. My stratum-1s,
    likewise. These are all running the stock ntpd, which is 4.2.0-a.

    $ ntpdc -c kerni ntp-0
    pll offset: 1.314e-06 s
    pll frequency: 68.119 ppm
    maximum error: 0.012947 s
    estimated error: 7e-06 s
    status: 2107 pll ppsfreq ppstime ppssignal nano
    pll time constant: 6
    precision: 1e-09 s
    frequency tolerance: 496 ppm
    pps frequency: 68.119 ppm
    pps stability: 0.022 ppm
    pps jitter: 1.142e-06 s
    calibration interval: 256 s
    calibration cycles: 85694
    jitter exceeded: 506860
    stability exceeded: 0
    calibration errors: 3

    (The refclock here is an EndRun Technologies Praecis Ct.)

    -GAWollman
    --
    Garrett A. Wollman | The real tragedy of human existence is not that we are
    wollman@csail.mit.edu| nasty by nature, but that a cruel structural asymmetry
    Opinions not those | grants to rare events of meanness such power to shape
    of MIT or CSAIL. | our history. - S.J. Gould, Ten Thousand Acts of Kindness

  4. Re: Time offset / Jitter under FreeBSD

    "Garrett Wollman" wrote in message
    news:fiurcr$cva$1@grapevine.csail.mit.edu...
    > In article ,
    > Bob wrote:
    >
    >>I installed FreeBSD on a drive, and booted my windows machine from it. The
    >>FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    >>jitter, also.

    >
    > How long did you leave it running? What drift value was reported?
    >
    > My stratum-0, running FreeBSD 6.2, consistently reports offsets to
    > other stratum-0s within +/- 5 ms, and to its refclock within a couple
    > of microseconds with the nanokernel and kernel PPS. My stratum-1s,
    > likewise. These are all running the stock ntpd, which is 4.2.0-a.
    >
    > $ ntpdc -c kerni ntp-0
    > pll offset: 1.314e-06 s
    > pll frequency: 68.119 ppm
    > maximum error: 0.012947 s
    > estimated error: 7e-06 s
    > status: 2107 pll ppsfreq ppstime ppssignal nano
    > pll time constant: 6
    > precision: 1e-09 s
    > frequency tolerance: 496 ppm
    > pps frequency: 68.119 ppm
    > pps stability: 0.022 ppm
    > pps jitter: 1.142e-06 s
    > calibration interval: 256 s
    > calibration cycles: 85694
    > jitter exceeded: 506860
    > stability exceeded: 0
    > calibration errors: 3


    For grins, I decided to start it with a -N. That does seem to make a
    difference. Someone else suggested getting the latest distro - 4.2.4.p4 - no
    difference. The compile was a learning experience in itself, as I've just
    started messing with BSD. Offset was apparent on all three computers I tried
    booting my install on. As far as how long it was running.... a few hours.
    My issue was that the offset was getting larger with time. The Meinberg
    version on the very same hardware under Win XP is consistently sub
    millisecond. I'll eventually be feeding it 1PPS directly. What is "....with
    the nanokernel and kernel PPS...."? When I compiled the 4.2.4.p4, I used
    their defaults, and I've wound up with a 1.3 meg binary - quite a bit larger
    than the one that is the default in BSD 6.2. I'm assuming that has
    everything under the sun in it.

    n2qew# ntpdc -c kerni
    pll offset: 0.00176014 s
    pll frequency: 9.271 ppm
    maximum error: 0.082631 s
    estimated error: 0.000428 s
    status: 2001 pll nano
    pll time constant: 4
    precision: 1e-09 s
    frequency tolerance: 496 ppm

    n2qew# ntpq -p
    remote refid st t when poll reach delay offset
    jitter
    ================================================== ============================
    -tesla.fireduck. 63.192.96.10 2 u 52 64 377 34.693 0.110
    1.032
    +vine.desynched. 132.163.4.101 2 u 54 64 377 36.271 1.617
    0.493
    -server1-a.your. 64.202.112.75 2 u 53 64 377 56.687 9.209
    1.072
    +207.46.197.32 138.23.180.126 3 u 56 64 377 106.590 2.940
    0.880
    *10.33.90.10 68.216.79.113 2 u 7 16 377 0.211 2.887
    0.091



  5. Re: Time offset / Jitter under FreeBSD

    Richard B. Gilbert wrote:
    > Bob wrote:
    >> I've been experimenting with running a timeserver under FreeBSD. Basically,
    >> I'm trying to build a dedicated box as a time server. I am currently running
    >> the Meinberg port under windows, and that seems stable.
    >>
    >> I installed FreeBSD on a drive, and booted my windows machine from it. The
    >> FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    >> jitter, also. Remember, the same machine running windows is generally sub
    >> millisecond - http://www.pool.ntp.org/scores/74.181.17.243/log offset.
    >>
    >> So.... I tried two different other computers after this. One was a Abit AMD
    >> something or other. The other is a VIA Mini-ITX. Similar results.
    >>
    >> In both the windows and FreeBSD cases, I verified the offset under FreeBSD,
    >> and the lack of offset under windows on the same machine was real by listing
    >> the IP of the machine with a list of other time servers including the
    >> NTS-100 on the ntp client on my laptop. The computer looked good under
    >> windows, and was way off from the rest of the pack when it was running
    >> FreeBSD.
    >>
    >> Is there some issue with, or some trick that needs to be played with the
    >> ntpd distributed with FreeBSD 6.2? I did another install of FreeBSD, and the
    >> results were the same. ntp.conf simply contains four servers - the same as I
    >> normally use. One of them is a local NTS-100.
    >>


    To OP: I would suggest updating to the latest version from ports. The
    version with the base system is 4.2.0 while ports/net/ntp is ntp-4.2.2p4
    (you could possibly even try ports/net/ntp-devel which is ntp-4.2.5p75)
    Theres a ports freeze at the moment I believe but I'll try and poke the
    maintainer to update the non devel port unless there a reason not to.
    Not certain this will help but more recent version cant hurt.

    >>

    >
    > Have you tried building and installing the Reference Implementation of
    > ntpd? Source is available at ntp.org.
    >
    > There is something out in BSD Land called "Open NTP" or something very
    > similar. When I last heard of it, the authors hadn't yet managed to
    > "get it right"!
    >

    Thats an option in freebsd but the base distribution uses the isc hosted
    reference implementation.

    Vince

    > _______________________________________________
    > questions mailing list
    > questions@lists.ntp.org
    > https://lists.ntp.org/mailman/listinfo/questions


  6. Re: Time offset / Jitter under FreeBSD

    > From: "Bob"
    > Date: Sun, 2 Dec 2007 02:09:33 -0500
    > Sender: questions-bounces+oberman=es.net@lists.ntp.org
    >
    >
    > I've been experimenting with running a timeserver under FreeBSD. Basically,
    > I'm trying to build a dedicated box as a time server. I am currently running
    > the Meinberg port under windows, and that seems stable.
    >
    > I installed FreeBSD on a drive, and booted my windows machine from it. The
    > FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    > jitter, also. Remember, the same machine running windows is generally sub
    > millisecond - http://www.pool.ntp.org/scores/74.181.17.243/log offset.
    >
    > So.... I tried two different other computers after this. One was a Abit AMD
    > something or other. The other is a VIA Mini-ITX. Similar results.
    >
    > In both the windows and FreeBSD cases, I verified the offset under FreeBSD,
    > and the lack of offset under windows on the same machine was real by listing
    > the IP of the machine with a list of other time servers including the
    > NTS-100 on the ntp client on my laptop. The computer looked good under
    > windows, and was way off from the rest of the pack when it was running
    > FreeBSD.
    >
    > Is there some issue with, or some trick that needs to be played with the
    > ntpd distributed with FreeBSD 6.2? I did another install of FreeBSD, and the
    > results were the same. ntp.conf simply contains four servers - the same as I
    > normally use. One of them is a local NTS-100.


    I would recommend installing the ntp-stable port and using that. If you
    are not familiar with the FreeBSD ports system, check in the FreeBSD
    handbook at:
    http://www.freebsd.org/doc/en_US.ISO...ook/ports.html

    I am running it on one of our WAN OWAMP servers
    (http://e2epi.internet2.edu/owamp/). Most have PPS trained clocks, but
    we can't get a signal into one location, so it is a stratum 2.

    > ntpq -p den-owamp

    remote refid st t when poll reach delay offset jitter
    ================================================== ============================
    *albu-owamp .PPS. 1 u 406 512 325 8.409 0.000 0.032
    +aofa-owamp .PPS. 1 u 54 64 376 50.709 0.035 0.028
    +atla-owamp .PPS. 1 u 37 64 376 54.089 0.003 0.027
    -bnl-owamp .PPS. 1 u 10 64 377 52.966 0.040 0.039
    -nash-owamp .PPS. 1 u 22 64 377 36.569 -0.040 0.033
    -sunn-owamp .PPS. 1 u 48 64 377 27.357 0.058 0.052

    As you can see, it tracks within a few microseconds. I can't say why you
    are having your problems, but I am running: FreeBSD den-owamp 6.2-STABLE
    FreeBSD 6.2-STABLE #0: Wed Jun 13 17:20:58 PDT 2007
    root@sd-owamp:/usr/obj/usr/src/sys/OWAMP i386

    Note that inconsistent delays between your system and the server(s). An
    asymmetric route or congested path could cause these problems.
    --
    R. Kevin Oberman, Network Engineer
    Energy Sciences Network (ESnet)
    Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
    E-mail: oberman@es.net Phone: +1 510 486-8634
    Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751

  7. Re: Time offset / Jitter under FreeBSD

    Bob,

    I don't yet know what to tell you.

    It has been my experience that FreeBSD is usually one of the best platforms
    to run ntpd on, even without -N.

    I'm not even sure what to suggest to you yet.

    It is possible there is a motherboard or BIOS or some other issue that is
    making a difference, something that Windows is aware of (or compensating
    for) that FreeBSD is not. This is just a guess.

    H
    --
    http://ntpforum.isc.org - be a member!

  8. Re: Time offset / Jitter under FreeBSD

    "Bob" writes:
    > I installed FreeBSD on a drive, and booted my windows machine from it. The
    > FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    > jitter, also. Remember, the same machine running windows is generally sub
    > millisecond - http://www.pool.ntp.org/scores/74.181.17.243/log offset.


    What does 'sysctl kern.timecounter' say?

    DES
    --
    Dag-Erling Smørgrav - des@des.no

  9. Re: Time offset / Jitter under FreeBSD


    "Dag-Erling Smørgrav" wrote in message
    news:86fxykdm4z.fsf@ds4.des.no...
    > "Bob" writes:
    >> I installed FreeBSD on a drive, and booted my windows machine from it.
    >> The
    >> FreeBSD port of ntpd shows a offsets in the 20-60 ms range. Issues with
    >> jitter, also. Remember, the same machine running windows is generally sub
    >> millisecond - http://www.pool.ntp.org/scores/74.181.17.243/log offset.

    >
    > What does 'sysctl kern.timecounter' say?
    >
    > DES
    > --
    > Dag-Erling Smørgrav - des@des.no



    What we have here is BSD noob coupled with lack of patience. That, coupled
    with the fact that the Windows version seems to have a faster slew rate. I
    left it alone long enough, and all is well. The Windows version seems to
    figure out the computer clock offset alot faster. The "default" location of
    the ntp.drift file is not in /etc. It is of course in /var/db, so all the
    looking and fiddling i was doing to the one in /etc was for nothing. I did
    build, and am running 4.2.4p4@1.1520-o

    It's behaving well, except it doesn't like to read my NTP-100 (10.33.90.50),
    while the Meinberg windows version (10.33.90.10) does just fine.

    BTW, this machine has no disk. It is running on an off the shelf 2 gig USB
    memory stick. 512 meg ram, no swap slice. It appears not to access the stick
    very often - maybe once every few minutes - but I'm not sure if they are
    reads or writes. Anyone here that can tell me if there is a way to see how
    often disk writes are occurring? I'd like to see how fast I'm burning up the
    flash stick. It's a full minimal install + man pages. The current version of
    ntpd was built on this machine.

    Thanks for the help.

    n2qew# ntpq -p
    remote refid st t when poll reach delay offset
    jitter
    ================================================== ============================
    -ns.unc.edu 129.6.15.28 2 u 6 64 367 46.649 5.865
    1.138
    +64.236.96.53 .ACTS. 1 u 2 64 317 39.811 2.366
    0.269
    +68.216.79.113 .ACTS. 1 u 21 64 377 21.753 3.099
    0.283
    *10.33.90.10 10.33.90.50 2 u 4 16 377 0.211 -0.003
    0.025
    10.33.90.50 .INIT. 16 u - 64 0 0.000 0.000
    0.000
    n2qew#

    n2qew# ntpq -p 10.33.90.10
    remote refid st t when poll reach delay offset
    jitter
    ================================================== ============================
    -ns.unc.edu 129.6.15.28 2 u 46 64 357 46.198 5.775
    0.543
    +64.236.96.53 .ACTS. 1 u 22 64 357 38.828 2.178
    0.593
    +68.216.79.113 .ACTS. 1 u 86 64 376 21.989 3.213
    0.719
    *10.33.90.50 .GPS. 1 u 7 16 377 0.428 0.057
    0.005
    n2qew#

    ntpdc> kerni
    pll offset: -7.889e-06 s
    pll frequency: 19.482 ppm
    maximum error: 0.021753 s
    estimated error: 8e-06 s
    status: 2001 pll nano
    pll time constant: 4
    precision: 1e-09 s
    frequency tolerance: 496 ppm
    ntpdc>

    n2qew# sysctl kern.timecounter
    kern.timecounter.stepwarnings: 0
    kern.timecounter.nbinuptime: 12748095
    kern.timecounter.nnanouptime: 0
    kern.timecounter.nmicrouptime: 2041
    kern.timecounter.nbintime: 113343
    kern.timecounter.nnanotime: 56018
    kern.timecounter.nmicrotime: 19303
    kern.timecounter.ngetbinuptime: 842
    kern.timecounter.ngetnanouptime: 1471
    kern.timecounter.ngetmicrouptime: 909935
    kern.timecounter.ngetbintime: 0
    kern.timecounter.ngetnanotime: 0
    kern.timecounter.ngetmicrotime: 6558219
    kern.timecounter.nsetclock: 4
    kern.timecounter.hardware: ACPI-fast
    kern.timecounter.choice: TSC(800) ACPI-fast(1000) i8254(0) dummy(-1000000)
    kern.timecounter.tick: 1
    n2qew#





  10. Re: Time offset / Jitter under FreeBSD

    "Bob" writes:
    > BTW, this machine has no disk. It is running on an off the shelf 2 gig USB
    > memory stick. 512 meg ram, no swap slice. It appears not to access the stick
    > very often - maybe once every few minutes - but I'm not sure if they are
    > reads or writes. Anyone here that can tell me if there is a way to see how
    > often disk writes are occurring? I'd like to see how fast I'm burning up the
    > flash stick. It's a full minimal install + man pages. The current version of
    > ntpd was built on this machine.


    gstat(8) - but this is getting very off-topic...

    DES
    --
    Dag-Erling Smørgrav - des@des.no

+ Reply to Thread