NTP server should point to a local NTP server

After installation. The NTP server can point to a local NTP server with the user’s country or continent.

Ubuntu should know the location of the installation because user need to select timezone during installation.

This can better use the network resources.

Is this a support request, a feature request?

Which version of Ubuntu?

1 Like

This is a feature request.

I am using Ubuntu 25.10

I don’t quite understand the problem this solves or the benefits that accrue.
Perhaps a more thorough explanation of the problem and the benefits might help.

2 Likes

Currently, the file /etc/chrony/sources.d/ubuntu-ntp-pools.sources
points to the following NTP servers.

1.ntp.ubuntu.com, 2.ntp.uuntu.com, 3.ntp.uuntu.com, 4.ntp.ubuntu.com

They are located in United Kingdom.

For example, I live in Toronto, Ontario, Canada. I selected Toronto time during installation.

Ubuntu can connect to ntp.torix.ca (in Toronto). Then the request can be responded locally instead of going through the Atlantic ocean and come back. That save a lot of time and energy.The bandwidth can be saved for other to use.

Do you mean the 48bytes an NTP UDP request consists of ? Or rather the 100bytes of the response packet ?

1 Like

Single computer might be small. But all the computers installing ubuntu will need to ask for time every 1 to 17 minutes. And there are more than 10 million of computers using ubuntu.

It would also require that someone maintains a list of all the national NTP servers in every country in the world. It would include their internet addresses. A lot would depend upon the reliability of the national NTP server.

At the present time Canonical maintains (keeps it relevant) the NTP server pool that every installation of Ubuntu uses.

This i think makes it simple for the user to change location and time zone if they travel to another location and time zone.

Electricity travels through copper wire at the speed of light. Data travels through fibre optic cable at the speed of light. The fibre optic cables that connect countries together are made up of many strands of glass fibre. It is what makes the internet resilient and accessing the world-wide web almost instantaneous.

The choke point is the connection from the telephone exchange to the house or building. This is especially true if the connection is a pair of twisted copper wires and not fibre optic cable. And don’t I know it!

Regards

1 Like

It can be simplified to 1 or 2 NTP servrers for a country (or continent). Similar to how we handle the mirrorlist.

The distance from my home computer to the NTP server in Toronto is about 1% the distance to Scotland, United Kingdom. It is something that Ubuntu can consider to optimize.

Isn’t ntp.ubuntu.com a server pool that already uses a nearby server?

In the file /etc/chrony/sources.d/ubuntu-ntp-pools.sources. ntp.ubuntu.com is commented out.

ntp.ubuntu.com points to servers in Scotland, United Kingdom. When I check on https://whatismyipaddress.com/hostname-ip

Servers pools like for example 0.ubuntu.pool.ntp.org will point to near NTP servers. If you want to try please use something like nslookup 0.ubuntu.pool.ntp.org and NOT your above mentioned web site else you will get NTP servers near host of the web site …


Maybe Ubuntu Server Gazette - Issue 1 - Network online target, Network Time Security, Matrix chat and Improving Chrony Time Source Configuration in Ubuntu contain useful information.

$ nslookup 0.ubuntu.pool.ntp.org
Server: 127.0.0.53
Address: 127.0.0.53#53

Non-authoritative answer:
Name: 0.ubuntu.pool.ntp.org
Address: 138.197.164.54
Name: 0.ubuntu.pool.ntp.org
Address: 23.159.16.194
Name: 0.ubuntu.pool.ntp.org
Address: 216.6.2.70
Name: 0.ubuntu.pool.ntp.org
Address: 216.128.178.20
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; no servers could be reached

Yes. This commnd return 4 ntp servers near Toronto. So I think user can just uncomment those lines in /etc/chrony/sources.d/ubuntu-ntp-pools.sources if they want to use a closer NTP server.

I found the following page which is useful in this topic.

https://www.ntppool.org/en/vendors.html

2 Likes

No reason to change ubuntu-ntp-pools.sources, just drop in a new file to /etc/chrony/sources.d for your preferred source, being sure to use the “prefer” option. I use

pool time.cloudflare.com iburst maxsources 4 nts prefer

since cloudflare’s servers are all over and support Network Time Security for better authorization. “prefer” puts the custom server on an equal footing with the default ubuntu servers, and chrony’s normal NTP processing will have it select a low-latency source.

The reason the ubuntu-ntp-pools.sources are the way they are is that those servers are known to support NTS; it would be bad to use less-secure sources by default. An installation that would like to use “closer” but perhaps less-secure sources should have to explicitly do that. Perhaps in the future ntp.org will publish regional lists of NTS-capable servers and the default Ubuntu install could take advantage, but I don’t think we’re far enough down the NTS adoption curve for that.