[ntp:hackers] Reduce jitter of refclocks (connected via USB)

Volker Strauß Volker.Strauss at gmx.de
Mon Mar 14 20:20:23 UTC 2011

Hash: SHA512


14.03.2011 20:25, Terje Mathisen:
> USB by design operates with a 1 ms polling interval, so this is
> exactly the jitter you should get, best case.
The latencies of internet connections are much worse, lets say above 15
ms. But there we don't have a jitter of 15 ms. ^^
OK, I know this can't be compared. My idea was to find a way to increase
the precision. We can't avoid the latency due to the USB polling
interval. But, maybe, we can minimize the resulting error.

We could also poll a couple of times and calculate the average offset.
This would minimize the "jitter". Not of each poll, I know.

Is it possible to get the exact time when the controller sends the
request to the USB device? Given that the device handles the request
immediately (and therefore approx. in the same time), we could also use
this timestamp and compare it with the response, even if the time until
the reponse will be received will vary. The offset would probably be
more or less static...?

I don't know, only some ideas. If there's no way to improve the
presicion, I still will survive... ;) But why not to try it?

14.03.2011 17:00, todd glassey:
> Are there free SATA Connectors on the Mother Board?
> You could probably also use the existing 1PPS refclock driver with very
> little hacking on the SATA controller since its periodicity is much
> better than the low-speed hubs which usually contain the USB
> functionality as an embedded USB 1 or USB 2 hub.
yes, there are three SATA connectors at the backplane of the PC. But,
how can I connect the USB refclock to an SATA port??

> yes which USB Hub (internal bridge chip) are you using? That will make a
> big difference in how the internal drivers set up interrupt processing.
System Information shows the following:
nVidia Corporation MCP79 OHCI USB 1.1 Controller
nVidia Corporation MCP79 EHCI USB 2.0 Controller

> As to running out of space in the PCI backplane we took a PCI socket
> extender and used it to hack an interrupt line into the system for 1PPS
> but the Meinberg 1PPS pulse is too wide for some systems use. The NIST
> NTP for instance needs a narrower positive going edge (about 50ns) and
> so we are using a box Len Cutler from HP Labs originally designed for
> conditioning the output of a 5071a so that it could be used for this
> same operation.

> The real issue is why you are going to all this trouble? why do you need
> more than 1ms of resolution for a production system which is not
> involved in securities trading or other HFT type applications?
That's no problem for me. I can live with worse as 1 ms resolution, I
just saw that the offset (and therefore the frequency) jumps around and
my first thaught was: isn't it possible to reduce this jitter?

>> My idea is to compare the delays of the pollings from the refclock.
> Would that include selecting from the best refclock available too?
I don't think that this would make sense since different refclocks may
have (very) different delays.

14.03.2011 14:08, David J Taylor:
> What operating system are you running, Volker?
Debian 6.0 "Squeeze", Kernel 2.6.32-5-amd64

Thanks for all your feedback!

Version: GnuPG v1.4.10 (MingW32)


More information about the hackers mailing list