libsodium mess
Kurt Roeckx
kurt at roeckx.be
Fri Jan 20 18:53:00 UTC 2017
On Thu, Jan 19, 2017 at 05:03:29PM -0800, Gary E. Miller wrote:
> > > > > A signal on a USB 2.0 bus can only have a resolution of about 1
> > > > > micro Second, but that can be locked to a PPS to 100 micro
> > > > > Seconds jitter.
> > > >
> > > > I'm not sure what you're trying to say.
> > >
> > > Each USB 2.0 device is polled 1024 times a second. So you would
> > > think you could only sync time over a USB 2.0 bus to 1/1024th of a
> > > second. About 1 micro Second. But that is not true, you can sync
> > > time over USB 2.0 to 100 microseconds.
> >
> > 1/1000 of a second would 1 millisecond, not microsecond.
>
> Sorry typo. But my conclusion, and my data, is unchanged.
>
> > > If you said the resolution is only 1 micro second, and you added
> > > 500 micro Seccond of jitter, you would make the sync 5 times worse,
> > > not better.
> >
> > You seem to be confusing milli with micro again, I'm going to
> > assume the first is milli.
>
> Nope. ntpd clearly tells me that my jitter is 100 micro Seconds.
> I get the same results using chronyd.
Yes, but i think you're saying your resolution is 1 ms.
> >
> > I guess you're saying:
> > - I can read about every 1 ms
> > - But there is jitter on that 1 ms in the order of 0.002 to 0.1 ms
>
> No, there is jitter on that of 1 mS to 0.1 mS.
I have no idea why you always write S or Seconds. The correct SI
unit is s, not S, and it's also just second. Is this some German
capitalization thing?
> > First, even though the PPS signal is only once per second, you're
> > really measuring the pulse, and you could say you're measuring that
> > with a resolution of 1 ms.
>
> No, the resolutin of my measurement is the resolution of the system
> clock.
But you only check about every 1 to 2 ms as I understand it. I was
under the impression that you talked about that as your
resolution. Normally you would call that the sample period, but
we're measuring time here which always confuses things somewhat.
In this case jitter and precision really are the same thing. But
if what you're measuring isn't time they're different things.
But I have no good other term other than the sample period /
frequency. It will clearly limit your accuracy, but it's not the
accuracy itself. NTP seems to be calling this precision.
> > You would instead need to modify the output of the PPS
> > signal to add random jitter to it, so that it doesn't always
> > happen every 1024 polls.
>
> That would be many mS of jitter. Also not good.
This might be counter intuitive, but adding noise can improve your
results, but it needs to be white noise. But there are usually
other ways to improve things to, like having a higher sample rate
in this case.
> > > > But if you're talking about jitter, you're really talking about
> > > > the precision.
> > >
> > > NTP uses yet another definition for precision, so it is confusing.
> > > NTP calculates precision from jitter. NTP precision (not accuracy)
> > > is assumed to be slightly worse than the jitter. The NTP precision
> > > can be no better than the jitter. Conversly the NTP jitter is
> > > better than the precision.
> >
> > NTP uses the smallest difference in time the program can see
> > as precision, which is at least confusing. Precision is about how
> > repeatable something is.
>
> Uh, no. The smallest difference in time it can see is about sys_fuzz.
> Basically how fast the clock can be read and/or the smallest tick in the
> clock that it can see. Not to be confused with the LSB of the
> read system clock.
>
> The precision can be 10e6 worse than that sys_fuzz.
>
> Once again, we really need an NTP specific dictionary because NTP defines
> things in unusual ways.
Oh, I do agree that NTP is confusing the terms, and I hope we can
at least agree on how they are used now.
ntp returns for me: precision=-23
That means it can read my system clock at a rate of 2^23 times per
second, and get a different value each time, with the difference
in time being 2^-23 (or about 0.12 us)
Kurt
More information about the devel
mailing list