Thu Jun 12 22:07:40 PDT 2014
latency with ntp alone, so you can (I would expect) get an otherwise
quiet LAN sync'd to a millisecond or even less. NTP does correction
over a long time and damps to a common clock, so you MIGHT get down
below the 1 ms mark over time. I doubt that ntp alone would make 10
b) Do you get to spend money? Can you purchase each node its own GPS
clock? The ntp docs suggest that if you have any sort of reference
clock (atomic, GPS, time pulse) your resolution is limited only by the
reference (and, probably things like gettimeofday, which are no better
than 2 usec as it is and can easily be worse).
c) If you don't get to spend money then you could TRY to use the onboard
tsc instead of coarsely adjusting the system clock per se. I'm using it
as a timer in my benchmark code and can give you a wrapped assembler
fragment for reading it. This clock is accurate to an inverse clock
(typically sub-nanosecond these days) BUT by the time you add the
overhead of reading it you diminish to perhaps 40-60 nanoseconds.
Still, in principle you have access to a clock with sub-usec resolution
(you can even measure and correct on average for the time required for
the wrapped call).
This clock is not configured for computing anything like absolute
systems time, so you'd have to do things like pingpong between systems
on the network a million times or so making slow adjustments to a
subtraction base until your "clocks" match within some resolution across
the entire network.
I actually don't think this would be horribly difficult. It's sort of
like you and I looking at our watches and saying "10:02:02" (you adjust
a tick and say "10:02:04" (and I adjust a tick) and eventually we get to
the point where we are PREDICTING what the other person will say so that
given an average latency MEASURED to within some precision, we can say
that our clocks match within that precision. I'm sure NTP does
something like this now with a coarser-grained clock, and you might be
able to steal it and just hack it to use the tsc and get what you want.
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Beowulf