Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Simplest NTP client for standalone system?
Date: Tue, 29 Aug 2017 15:37:49
Message-Id: 9ce75b6d-6ff1-5331-ca24-b2190e581208@gmail.com
In Reply to: Re: [gentoo-user] Simplest NTP client for standalone system? by Rich Freeman
1 On 29/08/2017 15:57, Rich Freeman wrote:
2 > On Tue, Aug 29, 2017 at 9:14 AM, Alan McKinnon <alan.mckinnon@×××××.com> wrote:
3 >>
4 >> ntp is designed for timeservers that by design do not make the clock
5 >> jump around. Every second on the wall clock actually happens, none are
6 >> missing. To do that, ntp adjusts the length of a second till the
7 >> machine's time creeps up towards the real time as defined by the U.S
8 >> Navy. Unless you are running software that is extremely time-critical
9 >> (eg centralized auth servers, science experiments, etc) or you operate a
10 >> proper time server, you absolutely do not need this behaviour ever.[1]
11 >>
12 >
13 > I'd argue the opposite. Assuming your system boots with approximately
14 > the correct time then slewing the clock is going to be the best way to
15 > maintain time.
16
17 Yeah but this is Stroller, and I gave an answer specific to him.
18
19 He doesn't run a fleet of business servers in containers like you do, or
20 maintain awful amounts of ISP infrastructure like I do. He's a regular
21 guy with regular machines.
22
23 We sysadmins can easily tend to get way too involved with the specifics
24 of how something works and how awesome it all is, and lose sight of what
25 people really need.
26
27 Another example is LVM. You or I might really need it (debatable now we
28 have ZFS) but the average user has no concept of what it might be, or
29 care. So why do Ubuntu installers shove it in your face as something
30 really cool that you should really really use? Because the author of the
31 installer thinks it's really cool, that's why.
32
33 ntpdate in a cron is a really easy way to keep time more or less
34 accurate. The average user and his software couldn't care less about
35 slew and couldn't care less if his computer time is 10 seconds off or
36 even a minute, same with his wristwatch.
37
38 But having said that, chrony just does it all without oversight and
39 without even needing to make a crontab, it's the perfect fire and forget
40 background daemon. I keep forgetting about chrony (have no real pressing
41 need to get it at install time)
42
43
44 > Now, if you're talking about a system that starts up with no concept
45 > of the real time then I'd say the best approach is to do a one-time
46 > sync to a time server, and then run ntpd from then on to maintain the
47 > time using slewing. Obviously you don't want to slew from the epoch
48 > to the current time.
49 >
50 > The one-time sync strikes me as the sort of thing that might ideally
51 > go into an initramfs. If you're obtaining your root filesystem over
52 > the network it might even be a dependency. Doing it that early
53 > eliminates most of the issues with logging and running services.
54 >
55
56
57 --
58 Alan McKinnon
59 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] Simplest NTP client for standalone system? Rich Freeman <rich0@g.o>