Giter VIP home page Giter VIP logo

rsntp's Introduction

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 ntpperf. The tests ran on a Linux machine with an Intel E5-1220 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.

ntpperf

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.

rsntp's People

Contributors

mlichvar avatar jgbyrne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.