create account

Howto: Configuring more frequent time synchronisation on Ubuntu by l0k1

View this thread on: hive.blogpeakd.comecency.com
· @l0k1 · (edited)
$8.18
Howto: Configuring more frequent time synchronisation on Ubuntu
<div class="pull-right"><br />https://www.mexperience.com/wp-content/uploads/Time-Spiral-680x340-1436399501.jpg</div>

<div class="pull-left"><h1>Since</h1></div> <br />they will be removing an inbuilt NTP client in <code>steemd</code> 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.

<div class="pull-right">😎</div><br /><hr />

<center><code>We can't code here! This is Whale country!</code></center>
<div class="pull-left"><a href="https://steemit.com/@l0k1"><img src="http://s20.postimg.org/igf27v79p/signature_new_small.png" /></a></div>

<h2>Vote #1 <code>l0k1</code></h2><sub>Go to <a href="https://steemit.com/~witnesses">steemit.com/~witnesses</a> to cast your vote by typing <code>l0k1</code> into the text entry at the bottom of the leaderboard.</sub>

<sub>(note, my username is spelled <code>El Zero Kay One</code> or <code>Lima Zero Kilo One</code>, all lower case)</sub>

</div>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 53 others
properties (23)
authorl0k1
permlinkhowto-configuring-more-frequent-time-synchronisation-on-ubuntu
categoryhowto
json_metadata{"tags":["howto","ubuntu","witness"],"image":["https://www.mexperience.com/wp-content/uploads/Time-Spiral-680x340-1436399501.jpg","http://s20.postimg.org/igf27v79p/signature_new_small.png"],"links":["https://steemit.com/@l0k1","https://steemit.com/~witnesses"],"app":"steemit/0.1","format":"markdown"}
created2017-03-22 08:51:12
last_update2017-03-22 09:11:24
depth0
children7
last_payout2017-04-22 12:44:06
cashout_time1969-12-31 23:59:59
total_payout_value6.530 HBD
curator_payout_value1.645 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,473
author_reputation94,800,257,230,993
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,803,708
net_rshares6,261,527,220,388
author_curate_reward""
vote details (117)
@chitty ·
$0.06
Thank you for this!
👍  
properties (23)
authorchitty
permlinkre-l0k1-howto-configuring-more-frequent-time-synchronisation-on-ubuntu-20170322t141000944z
categoryhowto
json_metadata{"tags":["howto"],"app":"steemit/0.1"}
created2017-03-22 14:10:00
last_update2017-03-22 14:10:00
depth1
children0
last_payout2017-04-22 12:44:06
cashout_time1969-12-31 23:59:59
total_payout_value0.058 HBD
curator_payout_value0.003 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation86,901,300,608,582
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,806,238
net_rshares116,792,824,959
author_curate_reward""
vote details (1)
@gutzofter ·
$0.06
What time you got buddy?
👍  
properties (23)
authorgutzofter
permlinkre-l0k1-howto-configuring-more-frequent-time-synchronisation-on-ubuntu-20170322t120633808z
categoryhowto
json_metadata{"tags":["howto"],"app":"steemit/0.1"}
created2017-03-22 12:06:36
last_update2017-03-22 12:06:36
depth1
children1
last_payout2017-04-22 12:44:06
cashout_time1969-12-31 23:59:59
total_payout_value0.046 HBD
curator_payout_value0.015 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length24
author_reputation7,621,537,677,018
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,805,069
net_rshares116,792,824,959
author_curate_reward""
vote details (1)
@l0k1 ·
$0.04
:)
👍  
properties (23)
authorl0k1
permlinkre-gutzofter-re-l0k1-howto-configuring-more-frequent-time-synchronisation-on-ubuntu-20170322t141808146z
categoryhowto
json_metadata{"tags":["howto"],"app":"steemit/0.1"}
created2017-03-22 14:18:09
last_update2017-03-22 14:18:09
depth2
children0
last_payout2017-04-22 12:44:06
cashout_time1969-12-31 23:59:59
total_payout_value0.039 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2
author_reputation94,800,257,230,993
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,806,349
net_rshares74,727,690,372
author_curate_reward""
vote details (1)
@hagbardceline ·
$0.06
Thank you for sharing some Bash wisdom here.
👍  
properties (23)
authorhagbardceline
permlinkre-l0k1-howto-configuring-more-frequent-time-synchronisation-on-ubuntu-20170322t093027157z
categoryhowto
json_metadata{"tags":["howto"],"app":"steemit/0.1"}
created2017-03-22 09:30:30
last_update2017-03-22 09:30:30
depth1
children0
last_payout2017-04-22 12:44:06
cashout_time1969-12-31 23:59:59
total_payout_value0.057 HBD
curator_payout_value0.003 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length44
author_reputation9,539,931,063,329
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,804,031
net_rshares113,452,514,087
author_curate_reward""
vote details (1)
@jerrybanfield ·
$0.03
Awesome guide I just followed this today thank you very much!
👍  ,
properties (23)
authorjerrybanfield
permlinkre-l0k1-howto-configuring-more-frequent-time-synchronisation-on-ubuntu-20170710t152804648z
categoryhowto
json_metadata{"tags":["howto"],"app":"steemit/0.1"}
created2017-07-10 15:28:03
last_update2017-07-10 15:28:03
depth1
children0
last_payout2017-07-17 15:28:03
cashout_time1969-12-31 23:59:59
total_payout_value0.021 HBD
curator_payout_value0.005 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length61
author_reputation362,393,802,961,900
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id7,998,158
net_rshares8,019,001,578
author_curate_reward""
vote details (2)
@pcste ·
Thanks :-)
👎  
properties (23)
authorpcste
permlinkre-l0k1-howto-configuring-more-frequent-time-synchronisation-on-ubuntu-20170705t004650139z
categoryhowto
json_metadata{"tags":["howto"],"app":"steemit/0.1"}
created2017-07-05 00:46:48
last_update2017-07-05 00:46:48
depth1
children1
last_payout2017-07-12 00:46:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation112,529,675,837,494
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id7,340,120
net_rshares-4,714,302,003
author_curate_reward""
vote details (1)
@l0k1 ·
Good call replying to this old post of mine as I am about to be running an RPC node. Well, it's not so important for RPC because I won't be missing blocks, but it may interfere with its function of relaying transactions to the witness nodes.
👍  
properties (23)
authorl0k1
permlinkre-pcste-re-l0k1-howto-configuring-more-frequent-time-synchronisation-on-ubuntu-20170705t041332555z
categoryhowto
json_metadata{"tags":["howto"],"app":"steemit/0.1"}
created2017-07-05 04:13:33
last_update2017-07-05 04:13:33
depth2
children0
last_payout2017-07-12 04:13:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length241
author_reputation94,800,257,230,993
root_title"Howto: Configuring more frequent time synchronisation on Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id7,354,122
net_rshares0
author_curate_reward""
vote details (1)