Operations 8 min read

Master Chrony: Fast, Accurate Time Sync for Linux Servers

This guide explains the fundamentals of time synchronization, why consistent timestamps are critical for distributed systems, and how Chrony provides a faster, more precise NTP alternative with low resource usage, including installation, configuration, and verification steps for Linux environments.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Chrony: Fast, Accurate Time Sync for Linux Servers

1. Time Synchronization Basics

1.1 What is Time Synchronization

Time synchronization aligns local system clocks with Internet time, providing a unified time reference. Local clocks drift due to varying rates and environments, so periodic synchronization is required.

1.2 Why Time Synchronization is Needed

Coordinated tasks across multiple hosts (e.g., LNMP architecture) require consistent timestamps.

Incorrect timestamps can cause security issues for HTTPS and other services.

1.3 How Time Synchronization Works

Manual adjustment using date or ntpdate can cause abrupt jumps.

Traditional NTP may take minutes to correct large offsets, while Chrony adjusts more smoothly.

2. Chrony Time Service

2.1 Introduction to Chrony

Chrony implements the NTP protocol and can act as both server and client.

It offers higher accuracy and faster convergence than classic NTP.

Low CPU usage and compatible with ntpdate.

Allows other hosts on the local network to synchronize with it.

2.2 Why Use Chrony

Central internal time server reduces latency and bandwidth compared to each host contacting public NTP servers.

Improves synchronization speed and reliability.

2.3 Installing Chrony

yum install chrony -y

Configuration file: /etc/chrony.conf Client program: /usr/bin/chronyc Server daemon:

/usr/sbin/chronyd

2.4 Default Configuration (excerpt)

# Use remote servers
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst

driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 192.168.0.0/16
local stratum 10
logdir /var/log/chrony
log measurements statistics tracking

2.5 Modifying Configuration

vim /etc/chrony.conf
# Example
server ntp1.aliyun.com iburst
server ntp2.aliyun.com iburst
allow 172.16.1.0/24
local stratum 10

2.6 Restart Service

systemctl restart chronyd

2.7 Client Usage

# Check sources
chronyc sources
# Force step correction
chronyc -a makestep
image.png
image.png
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

NTPtime synchronizationchrony
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.