Hello,

I am running a software on a Linux machine, I am synchronizing time via default ntpd configurations available in Linux (/etc/ntp.conf).
I am connecting to the customer NTP server.
Now i was requested to tell which synchronization type is used on my machine (Frequency Synchronization/ Time Synchronization or Time-of-day Synchronization)

Now after some googling it seems there is two types for NTP synchronization:
1- Phase Synchronization.
2- Frequency Synchronization.

But how can I decide which of them is used by Linux? I am already connected the customer NTP server and they told that their NTP doesn't support Time Synchronization, so should it be Frequency Synchronization which is used by Linux machines?

The customer is refering to RFC5905 in his questions but I couldn't find anything useful about my question in the RFC.

Thanks in advance for assistance.

Dani AI

Generated

Short answer for : Linux NTP clients do both phase (time-of-day) and frequency discipline. NTPv4’s clock-discipline algorithm is a combined phase‑locked / frequency‑locked loop that measures offset (phase) and estimates oscillator drift (frequency) and uses both to steer the system clock. (rfc-editor.org)

What that means in practice on Linux: an NTP daemon measures offsets to servers and either slews the clock (gradual rate change) or steps it (instant set) depending on the offset and configuration. Classic ntpd will step by default for large offsets (default ~0.128 s) and slew for smaller ones; it can be run in slew‑only mode or tuned with step/tinker settings. The user‑space daemon talks to the kernel time discipline via adjtimex / ntp_adjtime to apply frequency corrections. (ntp.org)

Quick checks you can run on a Linux host to see what’s happening:

# which daemon
ps -ef | egrep 'ntpd|chronyd'
systemctl status ntp chronyd

# if using ntpd
ntpq -pn

# if using chronyd
chronyc tracking
chronyc sources -v

# kernel discipline / frequency state
adjtimex --print

The monitoring/query tools are documented in the ntpq and chronyc manuals; adjtimex shows kernel time/frequency variables. (manpages.debian.org)

If the customer really wants “frequency‑only” behavior (never change time-of-day), configure the client to avoid steps: ntpd can be run with slew-only options (or set step thresholds), and chronyd can be tuned (makestep, maxslewrate, etc.) so steering is done without jumps. Beware: slew‑only correction can take a long time to converge for large offsets and can cause problems on suspended VMs or systems that must be immediately accurate. For telecom/base‑station grade phase alignment (sub‑microsecond), operators typically use PTP or GNSS+PPS with hardware timestamping rather than plain NTP. (manpages.debian.org)

Notes tied to the thread: ’s point about base stations using dedicated clocks is consistent with the above — NTP is usually sufficient for servers and apps, but not for strict phase requirements; ’s practical note about perceptibility is also correct for most applications.

Recommended Answers

All 4 Replies

Why does this matter to you? How accurately you can sync your clock? Anything within one second is not discernable to humans.

Since NTP can reduce synchronization offsets to times of the order of a few milliseconds over the public Internet, the ONLY time this question came up is when cellural comms as in base stations were concerned. For all practical considerations NTP is orders of magnitude better than what a human needs.

I can write that is is not phase sync...

Hi Rubberman,
I really dont care about this but its a question I got from the customer, the NTP vendor wants to know the type of sync used by all clients connected to their NTP server.

Hello Rproffitt,
Thank you for your answer, yes this question came up only when talking abour radio network element in mobile operators usually, but for some reason they wanted to know which exact sync algorithm is used by us and I tried to check online for an answer but couldn't find anything useful about if Linux is using frequency or phase sync, however yes I came up that the algorithm used by Linux is more near frequency but can't be phase sync.

Thank you!

. The code is open source which means open to inspection. I neglected to note the algorithm is on the web too but frequency? Nope, it's just setting the clock from NTP sources to within a few milliseconds. If that is not good enough then you need one of those cellular equipment time sources. My background includes cellular base station design.

has the basics and references on NTP.

I've yet to find anyone ask for more since the goal is the time be set to withing a second. Since system response time can vary under load, it would be silly to think the clock being off by 100 milliseconds to matter. Base stations and the DSP system there would need better than this so they use a station clock (those dedicated highly accurate clocks.)

commented: Well said. Cell phone clocks are usually synced to the local cell tower. +14
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.