Howto: Configuring more frequent time synchronisation on Ubuntu


Since


they will be removing an inbuilt NTP client in steemd it is important for witnesses to configure time synchronisation on their servers. It's not difficult, just install one package and set a more frequent rate of NTP polling to minimise the drift.

Installing the service

It is not installed by default, though timedatectl it polls upon boot as well as when a network connection comes up (the same thing, in effect, most of the time), so you need to install a package to get regular NTP time synchronisation:

sudo apt-get install ntp

Then you want to edit the configuration to change from the default polling frequency. The default polling frequency is 1024 seconds, and the parameters are powers of 2, so 2 means 4 seconds, 3 means 8, 4 means 16, etc. You need to edit the configuration file:

sudo nano /etc/ntp.conf

and add to the end of it:

minpoll 5
maxpoll 7

This means it will poll at a frequency between 32 and 128 seconds, about 30 seconds to 2 minutes. At a frequency of the default 1024 seconds, the time can drift more than a few nanoseconds, sometimes more, depending on the hardware, sometimes it can drift even up to a couple of hundred milliseconds which starts to get into the range of being able to cause a Witness to fail to produce a block on time.

When the inbuilt NTP client is removed, this could become a serious problem.

Now, after you edit the configuration, you need to enable and restart the ntp time sync daemon:

sudo systemctl enable ntp
sudo systemctl restart ntp

From then on, the system will stay accurate to within tens of milliseconds at worst, and this will help ensure your witness never misses a block.

😎


We can't code here! This is Whale country!

Vote #1 l0k1

Go to steemit.com/~witnesses to cast your vote by typing l0k1 into the text entry at the bottom of the leaderboard.

(note, my username is spelled El Zero Kay One or Lima Zero Kilo One, all lower case)

H2
H3
H4
3 columns
2 columns
1 column
7 Comments