[time-nuts] NTP jitter with Linux

Dennis Ferguson dennis.c.ferguson at gmail.com
Thu Apr 5 20:59:49 UTC 2012


On 5 Apr, 2012, at 13:03 , shalimr9 at gmail.com wrote:

> An older laptop (Pentium M for instance) can be had for $80 or so any day of the week, won't take much space, is completely standalone (built-in keyboard and display, built-in battery backup) and sips power when idle, which it will be most of the time.
> 
> The only issue is that you might be tempted to run more things on it and affect NTP performance. But if you load it with BSD and use it just for that, it will be a dandy solution.

I'll take some issue with that.  The best clock source for software
running on a computer, particularly when the applications might be
expected to take a lot of time stamps, is one which (a) works, (b)
has reasonable precision, and (c) is as cheap as possible to sample.
On Intel processors the most precise and inexpensive-to-read counter
available (i.e. conditions (b) and (c)) is the TSC, so you want to
use this if at all possible.  The problem with using the TSC is that
it sometimes violates condition (a), that is the "works" part.  On
some older processors it does not necessarily increment at a constant
rate, and on boards with multiple CPUs there can be multiple TSCs with
different times, so in these cases you may have to use something else
which isn't as good as the TSC would be if it worked.

For some random computer whose clock you want to set this is all fine.
It should use a counter known to work, and if the TSC doesn't it should
just use something else.  For something you are buying to be a dedicated
NTP server, however, it is worth while adding "working TSC" very high
on the list of desirable attributes.  The problem with some older CPUs,
like the Pentium M, is they are of a vintage which did not guarantee the
TSC would increment at a constant rate, and a variable rate makes it useless
as a clock.  It is possible you could work around that at some cost (maybe
the "sips power when idle" part) but I'm of the opinion that life is too
short for that and it would be better to pick something with a known-to-work
TSC for this application.

The Atom processors aren't bad.

Dennis Ferguson



More information about the Time-nuts_lists.febo.com mailing list