Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Not sure if I consider this as a spam but...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  

Is it?
SPAM for sure! Kill it with fire!
33%
 33%  [ 1 ]
I wouldn't mind...
66%
 66%  [ 2 ]
So cleverly injected spam... I'm going betting on that site!
0%
 0%  [ 0 ]
Total Votes : 3

Author Message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sun Jan 14, 2024 6:12 pm    Post subject: Not sure if I consider this as a spam but... Reply with quote

I've spent way too much time configuring chrony (complex ntp program).
I added several ntp servers into my list, but only four pools, which are those in the default config.
From those pools chrony gets some random servers. I assume chrony is given the servers with least delay or based on location.

Anyways. I sometimes go and list the "sources" (servers) to see the stats:
a snip of chronyc -v sources output:
  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| /             'x' = may be in error, '~' = too variable, '?' = unusable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^- static.141.138.216.95.cl>     2   8    77    53   +130ms[ +130ms] +/-  213ms
^- time.cloudflare.com           3   8    77    50   +180ms[ +180ms] +/-  274ms
^- time.jaa.richiefi.net         1   8    77    54  -3733us[-3733us] +/-  111ms
^- hirvi.miuku.net               3   8    77    52    +11ms[  +11ms] +/-  103ms
^- gamma.rueckgr.at              2   8    77    45    +43ms[  +43ms] +/-  127ms
^- ntp3.dnainternet.fi           2   8    77    42   +111ms[ +111ms] +/-  194ms
^- git.dynamigs.net              3   8    77    45    +89ms[  +89ms] +/-  187ms
^- mx1.slotsmegacasino.com       2   8    37   232   -170us[ -170us] +/-   77ms
^- ftp.mikes.fi                  2   8     7    67    +53ms[  +53ms] +/-  104ms
... do you see it? :D

I mean... yeah, having a accurate clocks on gambling is pretty crucial. What is funny is that that came from ntp.org pool. :P
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4157
Location: Bavaria

PostPosted: Sun Jan 14, 2024 7:03 pm    Post subject: Reply with quote

As a paranoid person, I would never use a pool where I don't know which server I will actually be connected to. ;-)

My chrony is only allowed to connect to two servers with atom time in my country (secured by FW). 8)
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54247
Location: 56N 3W

PostPosted: Sun Jan 14, 2024 7:53 pm    Post subject: Reply with quote

I cheat, I have my own stratum 1 ntp server.
I use the gentoo pools as backup.

Hmm, it can only see two satellites :(
The garage roof must be wet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sun Jan 14, 2024 8:05 pm    Post subject: Reply with quote

pietinger wrote:
As a paranoid person, I would never use a pool where I don't know which server I will actually be connected to. ;-)
chrony (and I guess other ntp programs) should be able to identify false servers. But are you concerned about possible backdoor?

NeddySeagoon wrote:
I cheat, I have my own stratum 1 ntp server.
I use the gentoo pools as backup.
I'l probably implement something like that too.
Although I'd prefer some USB GPS dongle. Until the time comes... I'm not in a hurry. Lots of other things to do before that.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Sun Jan 14, 2024 8:17 pm    Post subject: Reply with quote

Quote:
I would never use a pool where I don't know which server I will actually be connected to.

Ntpd attempts to follow the consensus between higher strata servers, and cronyd tries to pick a suitable server to follow after kicking out the outliers. I'm not too concerned about one bad actor trying to skew my time.

Ultimately, it doesn't even matter what time it actually is as long as everyone agrees on what the time is. The best (and at the same :lol: time :lol: stupidest) example proving my point is called "Daylight Saving Time", which makes everyones' clocks off by 1 hour for half a year and yet the world keeps rolling like nothing happened.


Quote:
I cheat, I have my own stratum 1 ntp server.
Any idea if there is a patch to ntpd or an alternative implementation that can read time from GPS without discipline?
I have a device I could use in this scenario, I know serial alone wouldn't be as accurate as PPS, but probably still better than the internet and definitely way better than no time at all without the internet.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sun Jan 14, 2024 8:29 pm    Post subject: Reply with quote

szatox wrote:
Any idea if there is a patch to ntpd or an alternative implementation that can read time from GPS without discipline?
I think OpenNTPD can..? The "without discipline" -part is what I'm not certain.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54247
Location: 56N 3W

PostPosted: Sun Jan 14, 2024 8:47 pm    Post subject: Reply with quote

szatox,

PPS tells you the boundary between seconds, its just an IRQ.
Serial tells you which second, so you need both.

If you don't care about subsecond precision, serial alone will do what you want.
Jitter may be horrible as the NEMA sentence length varies.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4157
Location: Bavaria

PostPosted: Sun Jan 14, 2024 8:58 pm    Post subject: Reply with quote

Zucca wrote:
[...] But are you concerned about possible backdoor?

No ... I have an AppArmor profile for it ;-)
Code:
chronyd (enforce)               ntp       2509  0.0  0.0   3636  1792 ?        S    16:36   0:00 /usr/sbin/chronyd -f /etc/chrony/chrony.conf -u ntp -F 2

_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Sun Jan 14, 2024 9:35 pm    Post subject: Reply with quote

Yeah, I know what PPS does, it's just that my GPS receiver doesn't provide that line, and the last time I tried it, I did not get the impression that ntpd would accept any input at all from a GPS receiver unless it provided PPS too. Hence my question about alternatives... Would be pretty cool if it was actually already supported and I just missed it though.
Or maybe it was gpsd that was the problem? It's been a while, I only vaguely remember it. Still, the fact remains that I came, I saw, I advanced in a different direction.
Back to top
View user's profile Send private message
sMueggli
Guru
Guru


Joined: 03 Sep 2022
Posts: 370

PostPosted: Mon Jan 15, 2024 10:00 am    Post subject: Reply with quote

pietinger wrote:
As a paranoid person, I would never use a pool where I don't know which server I will actually be connected to. ;-)


Cool. Was it difficult to convince the server administrators to give you access to the datacenter and unplug the ethernet cable to be really sure that you are indeed connected with the correct server?
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Mon Jan 15, 2024 6:22 pm    Post subject: Reply with quote

Zucca wrote:
Although I'd prefer some USB GPS dongle. Until the time comes... I'm not in a hurry. Lots of other things to do before that.

USB is pretty useless for accurate timekeeping.

The (serial) GPS signal is pretty bad when it comes to accuracy. The sentences send by a GPS simply tells the time, it doesn't tell when that time started. Is it at the beginning of the sentence? At the end? Somewhere in the middle? Or something else?
PPS gives an accurate point in time when a second starts, this means timing for this signal is crucial if you want accuracy. Processing an interrupt from a GPIO or serial port is pretty low tech and easy to do. USB, with it's protocol stack controllers and complex drivers isn't. If this caused a fixed delay it wouldn't even be that bad, but jitter is all over the place.
So if you want to build an accurate NTP server yourself USB usually isn't the best way to go. Some don't even have PPS at all which leaves you with 100's of milliseconds of inaccuracy, while my PPS based clock reaches microsecond accuracy.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Mon Jan 15, 2024 8:48 pm    Post subject: Reply with quote

Thanks. I'll keep that in mind. I have some PCs lying around which have DB9 serial. Some even have good old parallel port.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Mon Jan 15, 2024 9:36 pm    Post subject: Reply with quote

Quote:
Some don't even have PPS at all which leaves you with 100's of milliseconds of inaccuracy, while my PPS based clock reaches microsecond accuracy.

I think we've left this era behind along with USB 1.0

With USB 2.0 doing ~500MBps it's hard to believe the jitter would inherently be this big.
After a quick search it looks like even the slowest usb2.0 mode sends 133B of useful data in a single 1ms frame. You should get current time to the other end within 2 ms. Hell, I'll be generous, 5 ms late is still way better accuracy than I can achieve starting clock manually (and probably slightly better than I can get from the internet).
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Mon Jan 15, 2024 9:43 pm    Post subject: Reply with quote

szatox wrote:
Quote:
Some don't even have PPS at all which leaves you with 100's of milliseconds of inaccuracy, while my PPS based clock reaches microsecond accuracy.

I think we've left this era behind along with USB 1.0
... the same way USB 1.0 keyboards and mice had more "lag" compared to PS/2 counterparts, I assume.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1392
Location: Germany

PostPosted: Tue Jan 16, 2024 7:31 am    Post subject: Reply with quote

Not the latest but a nice display how it got slower: https://danluu.com/input-lag/
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Sat Jan 20, 2024 11:32 am    Post subject: Reply with quote

szatox wrote:
Quote:
Some don't even have PPS at all which leaves you with 100's of milliseconds of inaccuracy, while my PPS based clock reaches microsecond accuracy.

I think we've left this era behind along with USB 1.0

With USB 2.0 doing ~500MBps it's hard to believe the jitter would inherently be this big.
After a quick search it looks like even the slowest usb2.0 mode sends 133B of useful data in a single 1ms frame. You should get current time to the other end within 2 ms. Hell, I'll be generous, 5 ms late is still way better accuracy than I can achieve starting clock manually (and probably slightly better than I can get from the internet).

This is not about throughput, it is about latency: The time between is moment the device wants to send the PPS signal and the moment the NTP process receives it.
Compared to internet time sources 2ms might not seem bad, but it's still 1000 times worse than PPS delivered via a real serial port or GPIO which can easily reach (sub)microsecond accuracy. The trick is that those input can directly trigger an interrupt instead of having a (USB) protocol stack to go through.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Sat Jan 20, 2024 2:55 pm    Post subject: Reply with quote

Sure PPS is better, I'm not arguing against that. What exactly are you going to do with those 1.998ms though?

I'd rather get whatever value I can out of a device I already have in front of me than get a new device which does the same thing marginally better. 1000 times 0 is still 0, I won't be able to tell a difference with pps or without.
Bonus points if said device happens to be a mobile phone with a GPS receiver soldered to the board and no exposed GPIO, so now I need 2 new devices just to put something on each end of discipline, instead of 1 I already have which would be good enough if I was able to make it actually do the thing it is already capable of doing.
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Sun Jan 21, 2024 11:43 am    Post subject: Reply with quote

To me running your own ntp server is all about accuracy, because if it isn't for accuracy, why wouldn't i just use some timesource from the internet?
Part of the fun is to tune it and try to get to even higher accuracy. Having PPS helps, PPS connected to a serial port or GPIO helps even more, running ntpd with high priority helps, running the least amount of other processes helps. Ideally i'd want the GPIO interrupt and ntpd to be isolated and handled by the same CPU core with nothing else, but i can't do that with my Pi2B+ because all hardware interrupts seem to be fixed to cpu core 0.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Sun Jan 21, 2024 12:08 pm    Post subject: Reply with quote

Well, if timekeeping is your hobby, that's a a valid point. Have you tried comparing your gps-pie to another atomic clock? I wonder how it fares.
Back to top
View user's profile Send private message
pa4wdh
l33t
l33t


Joined: 16 Dec 2005
Posts: 812

PostPosted: Sun Jan 21, 2024 4:15 pm    Post subject: Reply with quote

Yeah, i always had a fascination with time ... :-)

I've never compared it to any atomic clock, and i guess/assume the atomic clock will be better by a big margin. If i remember correctly the GPS signal should be capable of delivering 0,1us accuracy but my Pi simply can't keep up.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 501

PostPosted: Mon Jan 22, 2024 10:38 am    Post subject: Reply with quote

NeddySeagoon wrote:
I cheat, I have my own stratum 1 ntp server.

This is the way. It's also not cheating!
NeddySeagoon wrote:
The garage roof must be wet.

Imagine not having an aerial on the roof...

Actual "timerserver hardware" in the UK was niche enough before GPS that it "wasn't cheap", and the same mfgr's offered drop-in replacements after the relocation of the analogue signal source caused issues for many southern users; this kept prices on the higher side. Pi and ubiquitous GPS use to the rescue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum