NFS fileserver / computer clock not in sync despite NTP setup

0

I have a fileserver running at home (Synology DS214se) which, among other things, serves my /home/<user> (per pam_mount controlled NFS).

This works just fine for all practical purposes, with one exception: The timestamps on my computer and the fileserver are not completely in sync.

This has no practical impact, except for when I make software. Every now and then, make will give me warnings about "something wrong with the clock", and files having timestamps zero-point-something seconds into the future.

Both my computer and the fileserver are configured to use my router (FritzBox) as NTP server.

Are these kind of sub-second drifts to be expected with NTP? Is there anything I can do about it?

The OS on my computer is Linux Mint 17. The fileserver runs Synology's own DSM 5.2.


$ ntpq -pcrv
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*fritz.box       147.231.100.5    3 u   21   64   17    1.748   -0.978   0.509
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.6p5@1.2349-o Thu Jan 21 23:29:25 UTC 2016 (1)",
processor="i686", system="Linux/3.13.0-24-generic", leap=00, stratum=4,
precision=-19, rootdelay=50.485, rootdisp=969.755, refid=192.168.178.1,
reftime=da66a126.0e8a0d9f  Thu, Feb 11 2016  6:56:54.056,
clock=da66a13b.58385082  Thu, Feb 11 2016  6:57:15.344, peer=33542, tc=6,
mintc=3, offset=-0.978, frequency=0.209, sys_jitter=0.000,
clk_jitter=0.346, clk_wander=0.066

DevSolar

Posted 2016-02-09T07:16:19.173

Reputation: 3 860

From your linux box can you do ntpq -pcrv and post the result in your question please. – user3788685 – 2016-02-11T00:10:22.890

@user3788685: Added. – DevSolar – 2016-02-11T05:59:07.860

Those stats look ok at a glance, but I see some rather big numbers for things like rootdisp=969.755 & rootdelay=50.485 which don't look good. How many external NTP servers is your fritz.box looking at? – user3788685 – 2016-02-11T23:19:02.033

@user3788685: Only one, 0.europe.pool.ntp.org. I'm pretty noob when it comes to NTP; I don't even know what those numbers mean or what would be "large" for any of them. :-\ – DevSolar – 2016-02-12T07:11:43.797

Answers

1

NTP behaves best when it has at least 3 servers to pick from, ideally 5. The short answer to your question is 'no' well behaved timing systems should be within a few ms of the reference source.

As to what the numbers mean - have a look here at the NTP definitions it explains what things like rootdelay & rootdisp mean and is probably a good place to start.

Here is what I suggest you try to see if you can improve your timing;

Don't use the FritzBox as a time server - routers are generally very bad at this task.

Don't use the NAS box as a time server - I have a few of these Synology units on sites all over and they are all really bad at keeping time as clients or servers. (mine all run with an offset of at least +1.5)

If you have a stable (linux) PC that's on 24/7 that would be a better choice if you want to run your own timing system, but you don't need to do that.

Configure your FritzBox to use 1 manually selected server which is a good ping to your network.

Configure your PC to use the same single internet server.

Configure the NAS Box to use the same internet server. - If you go into the command line/ssh you can tweak the config file for ntp if you need to.

If you use the same single source for everything it should minimise your issue in this case.

user3788685

Posted 2016-02-09T07:16:19.173

Reputation: 377