百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rsntp

> 编程语言
开源

以 Rust 编写的高性能 NTP 服务器

100 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

以 Rust 编写的高性能 NTP 服务器

= 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 graphs compare the +rsntp+ performance with +chronyd+ (version 4.1), as measured by https://github.com/mlichvar/ntpperf[+ntpperf+]. The tests ran on a Linux machine with an Intel E3-1220 v6 CPU (4 cores) and a 1Gb/s Intel I350 network card. The maximum rate of NTP requests and responses at the 1Gb/s speed is about 1100k per second.

image::ntpperf.png[]

The graphs show that with +rsntp+ the server starts dropping packets at a higher rate than +chronyd+ and its performance is more stable as the rate of requests is increasing. +chronyd+ does not use multiple threads as a server. It needs to be started in multiple instances sharing the server port in order to utilize multiple CPU cores. It starts dropping packets at a lower rate and the response rate is jumping up and down as the request rate is changing. With both implementations 4 threads/instances are needed on this system to fully saturate the 1Gb/s link without any packets dropped, but +rsntp+ with 3 threads is very close to it.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言