Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    pfSense NTP Fluctuating Offset

    General pfSense Questions
    ntp ntpd pfsense config
    2
    5
    720
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      argonaut last edited by argonaut

      Hi

      My first post here as I am a pfSense noob and have just installed on what I thought is an overpowered system, but I am getting poor NTP performance, at least in comparison with what I am used to…

      Hardware
      Gigabyte H370 WiFi Mini-Itx MB with (2) Intel integrated NIC’s :-
      i219-v as WAN
      i211 as LAN
      Intel Celeron G4920 CPU @ 3.20GHz
      120GB M.2 SSD
      4 GB RAM

      Software
      pfSense version 2.4.4-Release-p2
      FreeBSD 11.2-Release-p6
      No Packages installed

      NTP Setup:-

      pfSense ntp configuration file

      tinker panic 0
      Orphan mode stratum
      tos orphan 12

      Upstream Servers
      server 10.4.0.14 iburst maxpoll 9 # a GPS time server on the LAN
      server 10.4.0.16 iburst maxpoll 9 # a PPS time server on the LAN
      server 10.4.0.17 iburst maxpoll 9 # a PPS time server on the LAN
      server 10.4.0.7 iburst maxpoll 9 # a Windows PC always on, local LAN
      server 10.4.0.18 iburst maxpoll 9 # a Synology Disk Station on 16 hrs/day

      statsdir /var/log/ntp
      logconfig =syncall +clockall
      driftfile /var/db/ntpd.drift
      restrict default kod limited nomodify nopeer notrap
      restrict -6 default kod limited nomodify nopeer notrap
      interface ignore all
      interface ignore wildcard
      interface listen igb0

      Setup Information
      0_1548746722101_FireShot Capture 009 - pfSense.localdomain - Status_ Monito_ - http___10.4.0.1_status_monitoring.php.jpg
      The offset fluctuates wildly swinging from +0.100ms to -0.750ms in the space of one hour.
      Offset is much larger than on other nodes on the network. By way of comparison:-
      ntpd 4.2.8p12 running on Windows has a stable offset of around 0.011ms (11us)
      ntpd 4.2.8p11 running on a Synology Diskstation DS713+ using an Intel Atom D2700 has a stable offset of around 0.009ms

      Is this a hardware issue? e.g. CPU throttling or NIC handoff?
      Is it a software configuration issue? Polling interval too long or Firewall configuration or Driver support?
      Is it a BIOS configuration issue?

      I have read that temperature can affect the offset – how sensitive to temperature is NTPD?

      How does the file structure work?
      There is no file at /etc/ntp as is normal with Linux?
      If you edit the file at /var/etc/ntpd.conf it has no effect?

      Sorry for all the noob questions but I think I must be doing something fundamentally wrong somewhere...

      Argonaut

      1 Reply Last reply Reply Quote 0
      • A
        argonaut last edited by argonaut

        I am still experiencing this issue and have not been able to find any satisfactory explanation or resolution to the problem.

        As you can see from this graph:-
        0_1549592326506_FireShot Capture 010 - pfSense.jpg

        The offset definitely varies with room temperature and there is not that much variation really. 25 deg Celsius when the Air Conditioner gets turned on of a morning and 27.5 degrees Celsius when it is turned off at night.

        In fact the offset tracks room temperature pretty accurately.

        Now this is not a surprise as that's what I've read.

        But what has got me baffled is why NTPD can't maintain the offset in a sub 100 micro second range as can other computers and devices on the network?

        Any help greatly appreciated :)

        PS some more info if this helps a diagnosis:-
        0_1549594004001_FireShot Capture 011 - pfSense.jpg

        1 Reply Last reply Reply Quote 0
        • stephenw10
          stephenw10 Netgate Administrator last edited by

          For reference I see similar results on everything I have logging that.

          Perhaps it's a display issue rather than an actual fault. Or other systems are reporting better numbers than they are actually seeing. Though that seems unlikely across such a range of systems.

          You actually need better than 1ms accuracy?

          Steve

          1 Reply Last reply Reply Quote 0
          • A
            argonaut last edited by argonaut

            Thanks Steve for your reply.

            I guess the accuracy thing is relative. For some people 1ms is great but when you have invested in some Stratum 1 NTP network servers which have a delay of around 100 us (sorry don't have a micro second symbol on my keyboard), then I expect NTPD to do better.

            I don't understand why the implementation of ntpd in FreeBSD/pfSense is not as accurate as the implementation I have in Linux or even on my Windows machines.

            I fired up a second machine with pfSense on it which has a serial port on the MB. I connected a Garmin 18x LVC with PPS and (somewhat) unsurprisingly the offset operates in a much narrower range (see below)

            0_1549968302449_FireShot Capture 012 - pfSense.localdomain.jpg

            1 Reply Last reply Reply Quote 0
            • stephenw10
              stephenw10 Netgate Administrator last edited by

              Mmm, I agree it seems odd. Have you been able to test it in FreeBSD directly?

              If it is something we are doing in pfSense we could dig into it but if it's something FreeBSD does it would need to be reported upstream really.

              Steve

              1 Reply Last reply Reply Quote 0
              • First post
                Last post