An NTP server that Keeps It Simple, Stupid https://github.com/moparisthebest/kiss-ntpd
Go to file
2019-04-04 10:09:49 +02:00
src allow IPv6 address in -s option 2019-04-04 10:09:49 +02:00
.gitignore import 2017-06-20 17:07:14 +02:00
Cargo.toml add options to drop root privileges and change root directory 2018-12-09 16:57:10 +01:00
Makefile import 2017-06-20 17:07:14 +02:00
README.adoc update benchmark results 2018-06-21 15:18:26 +02:00

= rsntp

+rsntp+ is an experimental high-performance NTP server written in Rust. It does
not implement a full NTP client and relies on another NTP client and server to
be running on the system instead. It periodically updates its state to mirror
the real NTP client/server and uses multiple threads to serve the current
system time.

By default, +rsntp+ uses one thread for IPv4 and another for IPv6. In order to
get the best performance, it's necessary to increase the number of threads
using the +--ipv4-threads+ and +--ipv6-threads+ options to correspond to the
number of CPU cores available on the system.

The real NTP client/server needs to be configured to listen on 127.0.0.1 on
port 11123 (or another port if specified with the +--server-addr+ option). For
instance, the following configuration should work with +chronyd+:

----
allow 127.0.0.1
port 11123
bindaddress 127.0.0.1
----

The following table shows the maximum number of NTP requests handled per second
measured on a Linux (4.16) machine with an Intel E5-1220 CPU (4 cores) and an
Intel I350 network card (1 Gb/s).

|==========================================================
| 1 thread	| 430 kpps
| 2 threads	| 750 kpps
| 3 threads	| 1030 kpps
| 4 threads	| 1100 kpps (maximum for 1 Gb/s)
|==========================================================