On Wednesday 22 February 2006 12:38, "Anthony E. Caudel"
<acaudel@...> wrote about 'Re: [gentoo-user] NTP problem':
> Brandon Enright wrote:
> Well, overnight it only reset twice; - some improvement!
>
> Here is my complete ntp.conf:
> # Name of the servers ntpd should sync with
> # Please respect the access policy as stated by the responsible person.
> #server ntp.example.tld iburst
>
> server pool.ntp.org
This chooses a single random server from the pool to sync with, which is
probably not /exactly/ what you want.
You have a few alternatives:
1) Change "server" to "servers". Then, ntpd will use all the IPs
associated with the domain name. As part of the process of syncing it
will invalidate peers that have long or volatile round-trip times. It
will, however, try to connect to 100s (IIRC) of IPs initially.
2) Use:
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
In this case, the daemon will only use the first address from each domain
name. <n>.pool.ntp.org (for n = 0-9, IIRC) resolves to the same addresses
as pool.ntp.org, but the primary address you get back is different each
time. (I believe the <n>. prefix is an attempt to prevent local caching,
which would be a problem if you just repeated your server line 3 times.)
You'll get better times syncing off multiple servers because the daemon can
use some statistics to remove some of the network latency issues.
However, you could still get a "bad draw" and get 3 servers far away from
you.
3) Follow this comment from *your* .conf file:
> # A good way to get servers for your machine is:
> # netselect -s 3 pool.ntp.org
netselect is available from portage, and I think it's generally installed
during your gentoo install as a dependency of mirrorselect. In any case,
you can use it to find 3 (or however many you want to use) servers close
to you.
Unfortunately, with this method, if better peers are added to the pool, the
network topology changes, or anything else to invalidate the quality of
the peers you pick, ntpd won't be able to automagically pick better ones.
Also, for any of these options, you should note the geographic sub-pools
that are available. I use us.pool.ntp.org. For (1) this will reduce the
number of IPs initially connected to, for (2) it will increase the chance
that you don't get a bad draw (because, generally, geographically closer
is closer on the network), for (3) ... Well, actually for 3 you might as
well pick the best ones from the entire pool.
--
Boyd Stephen Smith Jr.
bss03@...
ICQ: 514984 YM/AIM: DaTwinkDaddy
--
gentoo-user@g.o mailing list
|