problem with Time in Dapper

Richard Johnson nixternal at ubuntu.com
Wed Oct 25 19:54:41 BST 2006


On Wednesday 25 October 2006 02:44, Daniel Pittman wrote:
[snip]
> I hate to say it Richard, but this is a pretty bad solution to keeping
> time stable on any machine.  It will work, but it is very hard on the
> software and system overall.

What is so hard on it? It runs the simple command every hour to update the 
time. I have a million things going at once, and never notice ntpdate use any 
resources. As a matter of fact, I just used "top" and run it during the 
ntpdate process, and guess what?  It doesn't even show up. This is the easy 
lazy way I will admit, but it works. The only fallback is if ntp.ubuntu.com 
goes down, then I will hear about it.

> ntpdate is a tool designed to make gross corrections to the clock: it
> simply sets the system clock to the appropriate time, no matter what.
>
> So, if you were off by a tenth of a second time jump.  Off by ten
> seconds, time jumps.  Off by an hour, time jumps.
>
> Now, for an "off by an hour" machine that is probably the right thing to
> do.  For one that is almost right, though, this is a pretty bad
> solution -- software doesn't like time jumping about, and can react
> pretty badly.[1]

I have been doing this for at least a good 5+ years, and never once had a 
problem.

> Oh, and your suggestion uses a single server, so if ntp.ubuntu.com ever
> has the wrong time your machine will slavishly follow suit and have the
> wrong time as well.[2]

That is a downfall, but a script can be created to fix that, if it ever 
becomes an issue.

>
> Anyway, running the ntp daemon is much nicer.  It has very good
> properties for keeping the clock in sync.  It never jumps the clock, but
> rather corrects it carefully so nothing ever sees a sudden change.

Well, my setup is never more than 1 second off per hour. ntpd is constantly 
polling at regular intervals, every few seconds. If your clock is an hour off 
every hour, then ntpd would be the way to go, but if it is only a second off, 
who cares.

> It pays serious attention to the properties of the clock in your
> computer, so that it can correct for things like drift and accuracy
> errors.

This is done by constantly polling, if this was the case then setting ntpdate 
to run every 10 seconds would do the same thing. ntpd doesn't allow bursts 
which could of course cause issues, especially when using sudoers. However, 
if you have the issue where you clock is more than 15 or so minutes, ntpd 
will exit out anyways and stop running. ntpdate in my script won't.

> It carefully checks the time coming in from the server and, if it is low
> quality, refuses to use it.  Given multiple servers it even checks them
> against each other and rejects any that are not connected to reality.

That it does.
>
> So, while your suggestion will work it will have a host of other
> problems.  On a single user desktop you may never notice them, but it
> isn't a good thing to configure as a general rule.
>
> Regards,
>         Daniel
>
> Footnotes:
> [1]  As in, you can see software fail to function at all, hang, serve
>      outdated content, misuse caches, etc.
>
> [2]  Yes, this /does/ happen in the real world.
>
> --
> Digital Infrastructure Solutions -- making IT simple, stable and secure
> Phone: 0401 155 707        email: contact at digital-infrastructure.com.au
>                  http://digital-infrastructure.com.au/

So, since my machines are my working desktops, all in good running order, my 
simple little addition is more than adequate. My servers that are constantly 
blasting away with mirrors, building packages, hosting and what not, yes I 
run ntpd on them. Plus I like the fact that each of my time updates are 
logged, so I can review the logs and seek discrepencies. So far the biggest 
update in my log in 2 years is, 3.3s. Most are under 1s. So, I would have to 
say my way isn't right or wrong, and your way isn't right or wrong. They both 
work, granted ntpd is preferred in a heavier environment, such as servers 
doing lots of work. ntpd is just one more service I don't need starting up as 
it is with the hundreds that already do.

-- 
.:Richard Johnson
.:nixternal at ubuntu.com
.:ubuntu.com .:kubuntu.com .:edubuntu.com .:xubuntu.com
.:http://nixternal.ubuntu-rocks.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/kubuntu-users/attachments/20061025/d30475a5/attachment-0001.pgp 


More information about the kubuntu-users mailing list