Re: [chrony-users] Re: Locking PPS refclock with NTP source

2017-09-07 Thread Thibaut BEYLER
I tested some other BIOS settings and found out that the disabling APIC
support improve a lot chrony perfomances :  PPS is good and i get much
better performance with my ntp sources : better std dev and test C is not
failing anymore ( like it did 90% of the time on some sources before with
chrony 3)

However, it also disable SMP support, so it's not a great solution.. I'm
currently trying to play with scheduling settings but so far no luck.


2017-09-07 15:32 GMT+02:00 Chris Perl :

> On Thu, Sep 7, 2017 at 5:09 AM, Thibaut BEYLER 
> wrote:
> > So i guess this is realted to some kind of cpu scheduling. However i
>
> And, just to help rule out actual scheduler latency, you could run
> chronyd with realtime priority (SCHED_FIFO or SCHED_RR) to make sure
> it always has an absolute scheduling advantage over other processes
> that aren't running with realtime priority.
>
> --
> To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org
> with "unsubscribe" in the subject.
> For help email chrony-users-requ...@chrony.tuxfamily.org
> with "help" in the subject.
> Trouble?  Email listmas...@chrony.tuxfamily.org.
>
>


Re: [chrony-users] Re: Locking PPS refclock with NTP source

2017-08-31 Thread Thibaut BEYLER
No I tested it on ordinary x64 kernel (4.9 , 3.16 etc..) coming from debian
& fc repos with no custom options.

I just installed pps-linux and invoked 'ldattach 18 /dev/ttyS0' (which also
loads pps_ldisc module) , maybe i'm missing something ?

2017-08-30 18:51 GMT+02:00 Miroslav Lichvar :

> On Tue, Aug 29, 2017 at 04:58:14PM +0200, Thibaut BEYLER wrote:
> > > #* PPS0  0   4   37711
> +4829ns[+6161ns]
> > >> +/- 3021ns
>
> > > PPS0   23  17   383 +0.0010.052
> > >>  +5ns5548ns
>
> > I am using pps_ldisc, i tried pps-gpio but it was not better.
> >
> > I am using a custom serial cable (pin 1 of the serial cable is linked to
> > the bnc ouput on the gps timeserver), same setup had given good results
> > using an other software.
>
> The chronyc output suggests the PPS input is very jittery. What
> architecture is that? If it has GPIO I'd assume it's not just an
> ordinary x86_64 computer. Also, what kernel version is it running? Is
> the NOHZ config option enabled? Disabling it with nohz=off might help.
>
> --
> Miroslav Lichvar
>
> --
> To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org
> with "unsubscribe" in the subject.
> For help email chrony-users-requ...@chrony.tuxfamily.org
> with "help" in the subject.
> Trouble?  Email listmas...@chrony.tuxfamily.org.
>
>


Re: [chrony-users] Re: Locking PPS refclock with NTP source

2017-08-30 Thread Miroslav Lichvar
On Tue, Aug 29, 2017 at 04:58:14PM +0200, Thibaut BEYLER wrote:
> > #* PPS0  0   4   37711  +4829ns[+6161ns]
> >> +/- 3021ns

> > PPS0   23  17   383 +0.0010.052
> >>  +5ns5548ns

> I am using pps_ldisc, i tried pps-gpio but it was not better.
> 
> I am using a custom serial cable (pin 1 of the serial cable is linked to
> the bnc ouput on the gps timeserver), same setup had given good results
> using an other software.

The chronyc output suggests the PPS input is very jittery. What
architecture is that? If it has GPIO I'd assume it's not just an
ordinary x86_64 computer. Also, what kernel version is it running? Is
the NOHZ config option enabled? Disabling it with nohz=off might help.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



Re: [chrony-users] Re: Locking PPS refclock with NTP source

2017-08-29 Thread Bill Unruh

And how do you know it is worse. The best way would be for you to have an even
better clock source to compare it to. 
Do you have that?



William G. Unruh __| Canadian Institute for| Tel: +1(604)822-3273
Physics _|___ Advanced Research _| Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology | un...@physics.ubc.ca
Canada V6T 1Z1 | and Gravity __|_ www.theory.physics.ubc.ca/

On Tue, 29 Aug 2017, Thibaut BEYLER wrote:


Thanks, this is working indeed, but should i get good results (like, not more 
than a few of micros
from my gps time) with these settings ?
Right now it is locking on PPS (*) but my clock seem worse (offset to utc) than 
when using only the
ntp server as source.


2017-08-24 17:38 GMT+02:00 Miroslav Lichvar :
  On Thu, Aug 24, 2017 at 05:18:08PM +0200, Thibaut BEYLER wrote:
  > I'm trying to synchronise chrony with a pps signal coming from a bnc 
output
  > on a gps timeserver.
  >
  > The pulses seems to arrive properly according to ppstest, but i don't
  > figure out how to combine this pulse with a ntp time source to complete 
the
  > samples (according to the documentation, it seems to be possible)
  >
  > All the exemples i see on the Internet use NMEA (which i don't think I 
have
  > out of my pps output) or another reference clock, any way to do that ?

The lock option can work only with other reference clocks. With an NTP
source you wouldn't specify the option, e.g.

server foo.example.com iburst
refclock PPS /dev/pps0

After start, chronyd will synchronize the clock to the NTP server.
This will allow the PPS refclock to complete the pulses and then it
can take over as the main time source for synchronization of the
system clock.

--
Miroslav Lichvar





Re: [chrony-users] Re: Locking PPS refclock with NTP source

2017-08-29 Thread Miroslav Lichvar
On Tue, Aug 29, 2017 at 02:58:20PM +0200, Thibaut BEYLER wrote:
> Thanks, this is working indeed, but should i get good results (like, not
> more than a few of micros from my gps time) with these settings ?

You should get the same results as if the PPS refclock was locked to a
NMEA source for instance. The lock option is mainly useful to speed up
the initial synchronization and allow the noselect option to be
specified with the NMEA or other low quality refclocks.

> Right now it is locking on PPS (*) but my clock seem worse (offset to utc)
> than when using only the ntp server as source.

Can you please post the output of "chronyc -n -m sources sourcestats" ?

What hardware and what PPS driver (e.g. serial, gpio) do you use?
Typically, on a x86_64 machine with a GPS PPS and real serial port the
offset should be stable to a microsecond or better.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.



Re: [chrony-users] Re: Locking PPS refclock with NTP source

2017-08-24 Thread Miroslav Lichvar
On Thu, Aug 24, 2017 at 05:18:08PM +0200, Thibaut BEYLER wrote:
> I'm trying to synchronise chrony with a pps signal coming from a bnc output
> on a gps timeserver.
> 
> The pulses seems to arrive properly according to ppstest, but i don't
> figure out how to combine this pulse with a ntp time source to complete the
> samples (according to the documentation, it seems to be possible)
> 
> All the exemples i see on the Internet use NMEA (which i don't think I have
> out of my pps output) or another reference clock, any way to do that ?

The lock option can work only with other reference clocks. With an NTP
source you wouldn't specify the option, e.g.

server foo.example.com iburst
refclock PPS /dev/pps0

After start, chronyd will synchronize the clock to the NTP server.
This will allow the PPS refclock to complete the pulses and then it
can take over as the main time source for synchronization of the
system clock.

-- 
Miroslav Lichvar

-- 
To unsubscribe email chrony-users-requ...@chrony.tuxfamily.org 
with "unsubscribe" in the subject.
For help email chrony-users-requ...@chrony.tuxfamily.org 
with "help" in the subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.