|
Xentara v2.1
User Manual
|
Many Linux installations use systemd-timesyncd(8) for time synchronization by default. systemd-timesyncd is designed to be used for normal office computers, where strict timing and accurate time synchronization are generally not required. In technical applications, systemd-timesyncd generally does not provide adequate time synchronization.
systemd-timesyncd has the following two shortcomings when used in time-sensitive applications:
Clock Discipline
systemd-timesyncd does not perform any clock discipline. If the hardware clock on your computer is running slow or fast, a fully featured NTP client will adjust the speed of the clock accordingly, so that it will always run at the correct speed. This is especially important because the speed of the hardware clock can vary with temperature, causing it to slow down or speed up as the system gets hotter or colder with outside temperature, or with varying CPU load. systemd-timesyncd does not attempt to correct the clock speed, but instead just sets the time to the correct time at regular intervals. Every time systemd-timesyncd adjusts the time in this fashion, the clock will jumps forward or backward, making it difficult for Xentara to maintain accurate timing. This can result in very uneven timer performance, or even lost timer cycles.
Accuracy
systemd-timesyncd uses SNTP (Simple Network Time Protocol) instead of NTP (Network Time Protocol). SNTP provides less accurate time synchronization than NTP.
If your system uses systemd-timesyncd, it is strongly recommended that you replace it with a fully featured NTP client, as described in this chapter. Alternatively, you can use the highly accurate PTP (Precision Time Protocol) protocol instead of NTP, as described under Time Synchronization Using PTP.
To determine which time synchronization service is currently in use, run the following command in a terminal:
The output will look something like this:
One (and only one) of the lines will end with the text “[installed]”, denoting that this is the service that is currently being used. In this example, systemd-timesyncd is used to synchronize the time. This is the default on many Debian-based Linux distributions.
The following example shows a system where systemd-timesyncd was originally used, but has been replaced with chrony:
Note that systemd-timesyncd is marked with the text “[residual-config]”. This means that systemd-timesyncd was used at some point in the past, but has since been removed. In that case, the configuration files for systemd-timesyncd will still be present on the system, because the apt(8) utility does not delete any configuration files when removing an installed package. This is deliberate, so that the configuration for the package will still be there should you ever want to switch back to the old service.
Unless you have specific requirements for one of the other available NTP implementations, you should use chrony for time synchronization. Replacing systemd-timesyncd with chrony can be done using the following simple terminal command:
This command will remove systemd-timesyncd and install and configure chrony. Time synchronization will start immediately, no reboot is required.