This is from: https://bugs.debian.org/1086000

Does anyone have insight on this? Is running at real-time priority actually helpful to timekeeping accuracy?

If not, I'll remove this from the Debian package (and we should probably remove the option upstream entirely?).

If it is helpful, is there something we should be doing differently to avoid the risk of starving out kernel threads?

On 2024-10-24 09:24, Felix Moessbauer wrote:
the ntpsec service starts the ntpd binary with the option "-N|--nice" (defined
in ntpsec.default (/etc/default/ntpsec) [1]. By that, the ntpd will run with
the highest possible priority, which is SCHED_FIFO, prio 99. These
priorities are discouraged as this can starve kernel threads.

Some recent stalls of PREEMPT_RT systems we observed could be related to
this.

Despite this option being called "nice", it does not just set the
niceness level. The corresponding code in ntpd is found in [2].
Removing this option lets the ntpd run with SCHED_OTHER, prio 20.

[1] 
https://salsa.debian.org/debian/ntpsec/-/blob/debian/unstable/debian/ntpsec.default?ref_type=heads#L1
[2] 
https://github.com/ntp-project/ntp/blame/9c75327c3796ff59ac648478cd4da8b205bceb77/ntpd/ntpd.c#L446

--
Richard

_______________________________________________
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to