[ntp:questions] Re: ntpd, boot time, and hot plugging

Brad Knowles brad at stop.mail-abuse.org
Sun Feb 6 03:07:36 UTC 2005


At 10:52 PM -0200 2005-02-04, Alain wrote:

>  ntpdate with 5 servers 3 seconds
>  ntpdate with 8 servers 4 seconds
>
>  It looks like ntpdate does most things in parelel.

	No, it does them in sequence.  Witness:

# /usr/bin/time -p ntpdate -b 10.0.1.240 time.euro.apple.com 
de.pool.ntp.org fr.pool.ntp.org nl.pool.ntp.org uk.pool.ntp.org 
0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org 
europe.pool.ntp.org
Password:
Looking for host 10.0.1.240 and service ntp
host found : 10.0.1.240
Looking for host time.euro.apple.com and service ntp
host found : interweb.euro.apple.com
Looking for host de.pool.ntp.org and service ntp
host found : ipx10540.ipxserver.de
Looking for host fr.pool.ntp.org and service ntp
host found : granny.lievin.net
Looking for host nl.pool.ntp.org and service ntp
host found : i157107.upc-i.chello.nl
Looking for host uk.pool.ntp.org and service ntp
host found : cheddar.halon.org.uk
Looking for host 0.europe.pool.ntp.org and service ntp
host found : time.as-computer.biz
Looking for host 1.europe.pool.ntp.org and service ntp
host found : change2linux.com
Looking for host 2.europe.pool.ntp.org and service ntp
host found : 62.101.81.203
Looking for host europe.pool.ntp.org and service ntp
host found : aszlig.net
  6 Feb 04:05:36 ntpdate[28684]: sendto(10.0.1.240): Host is down
  6 Feb 04:05:37 ntpdate[28684]: sendto(10.0.1.240): Host is down
  6 Feb 04:05:38 ntpdate[28684]: sendto(10.0.1.240): Host is down
  6 Feb 04:05:39 ntpdate[28684]: sendto(10.0.1.240): Host is down
  6 Feb 04:05:40 ntpdate[28684]: step time server 193.201.200.139 
offset -0.013175 sec
real        14.43
user         0.01
sys          0.04

	And here's ntpd:

# /usr/bin/time -p ntpd -gq -f /var/run/ntp.drift -p 
/var/run/ntpd.pid 
ntpd: time slew -0.009592s
real        16.07
user         0.01
sys          0.01


	It just so happens that, in many cases, you can get those few 
packets out to the servers and back quickly enough that ntpdate will 
finish within a few seconds.

	Steve has shown that ntpd will get up and running in about seven 
seconds on his machine, whereas it's a bit slower on mine since some 
of the servers I've selected in my ntp.conf are down/non-responsive. 
I'm also on a slow ADSL line, I'm connected to that through an Apple 
Airport Extreme base station on a wireless 802.11b network with WEP 
encryption (which always slows down wireless network throughput), and 
I'm running on an ancient PowerBook G3 laptop running MacOS X that is 
being pushed fairly hard to just run the OS and keep a few programs 
in memory, much less do anything useful.

	Contrariwise, Steve is running on a Soekris 4801 single board 
computer which is pretty much otherwise unloaded (except for ntpd), 
running a fairly stripped version of FreeBSD, and I believe he's 
connected to his cable modem line directly via 10/100 Base-T/TX 
Ethernet as opposed to WLAN.

	I don't know how much of my slow down is due to what factors, but 
I'm not too surprised.

-- 
Brad Knowles, <brad at stop.mail-abuse.org>

"Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety."

     -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
     Assembly to the Governor, November 11, 1755

   SAGE member since 1995.  See <http://www.sage.org/> for more info.



More information about the questions mailing list