As some users know, like i posted before, i have a raspberry pi stratum 1 server running ntpd, but sometimes when the load incrases i see only one cores of raspberry pi is fully used to process the ntpd process, I already incrased de nice of process to -20 (highest priority), but i want to know if have some way to incrase the number of cores that can be used by ntpd…
FWIW, I tried rsntp on a Pi 3B+ some time ago and it didn’t help much. IIRC it could do only about 20-25 kpps. I suspect the bottleneck is in the USB NIC, not the CPU.
I’m gonna try here, i’m using a full link of 100mbps (with onboard ethernet) and preempt-rt kernel… How can i configure this rsntp? is the same of ntpd configuration? Already compilled.
You still need ntpd or chronyd to synchronize the clock. They need to be configured to listen on a different port or the loopback interface, so rsntp can bind to the NTP port and respond to client requests. Please see the README in the github repo.
rsntp should be started with the following options:
rsntp -4 2 -6 0 -a $ADDRESS:123 -s 127.0.0.1:123
where $ADDRESS is the address of the real interface (it cannot bind to wildcard). If you have an IPv6 address, it should be specified with the -b option and -6 should be changed to 1 or how many threads you want to use for IPv6.
Run ntpdate or similar on a remote machine to make sure it is responding with “synchronized” packets. If your score is dropping suddenly, you know it’s wrong.
htop shows that all cores are utilized, but it would be nice to confirm it’s actually handling more packets. In my experience with a Raspberry Pi it was only slightly more, maybe 20%. That was with rsntp built by cargo build --release. Debug binary was significantly slower.
Good news! With rsntp the server score stays very stable, is really impressive! The only drop after reach maximum punctuation is because a reboot that i’ve made!
The only drops are for server load while i’m tweaking and compilling kernel, so, it is really good! Another question, RPI has 4 cores, can i use 3 cores for IPv4 and 1 core for IPv6? The
Better is a matter of opinion I suppose. NTPD has been around a long time, has direct support for many (legacy) refclocks, and other good things. However the source code has really grown over the decades and is in serious need of a major overhaul.
Chrony is a more recent program, it’s also much leaner. It doesn’t have all the legacy support that NTPD has, it’s geared towards more modern OSes.
There is also NTPsec which is a fork of NTPD that has been stripped down and removed a ton of the obsolete legacy code (thus like Chrony it also only builds on more modern OSes). As the name implies it is more security focused too, I believe they have also re-written a fair amount of code.