Add configure option to force retry on DNS failure
This is apparently needed on system which keep nameservers specified
in /etc/resolv.conf even when there is no network connection. Should be
used with care as invalid names will be retried forever.
Miroslav Lichvar [Tue, 25 Jan 2011 16:22:00 +0000 (17:22 +0100)]
Make importance of stratum in source selection configurable
Instead of always selecting the source with minimum stratum, add weighted
stratum to the distance when comparing selectable sources. The weight
can be configured with new stratumweight directive and can be set to
zero to ignore stratum completely, by default 1.0.
Miroslav Lichvar [Mon, 24 Jan 2011 17:04:33 +0000 (18:04 +0100)]
Disable variance source test for now
It seems it triggers even with one source alone if it's close and
accurate or polling interval is long enough. It would need to include
max_clock_error.
Miroslav Lichvar [Mon, 24 Jan 2011 16:09:00 +0000 (17:09 +0100)]
Select source with minimum distance using a scoring system
Each source has a score against currently selected source which is
updated (multiplied by ratio of their distances) when one of the two
sources has a new sample. When the score reaches a limit, the source
will be selected. This should allow to slowly select the source with
minimum distance without frequent reselecting.
To avoid switching between sources with very variable distances (e.g. on
LAN or when upstream server uses a longer polling interval), sources
that are currently not selected are penalized by a fixed distance. This
can be configured with new reselectdist directive (100 microseconds by
default).
Miroslav Lichvar [Thu, 16 Dec 2010 17:27:38 +0000 (18:27 +0100)]
Delay selecting source on start
On start, when servers are reachable and use the same polling interval,
wait for them to have the same reachability register (which corresponds
to the number of samples in sourcestats) before selecting one.
Miroslav Lichvar [Thu, 16 Dec 2010 15:55:59 +0000 (16:55 +0100)]
Don't update local reference unnecessarily
Local reference is now updated only when a new source is selected or
match_addr is equal to the selected source, match_addr 0 is no longer
treated specially.
Miroslav Lichvar [Thu, 16 Dec 2010 15:01:29 +0000 (16:01 +0100)]
Track reachability in sources module
Add new flag to source struct to indicate when source is selectable
(packets with good headers are received) and use a reachability
register for last 8 samples instead of the reachable flag. Source
drivers now provide only reachability updates.
Require that the ratio of the increase in delay from the minimum one in
the stats data register to the standard deviation of the offsets in the
register is less than maxdelaydevratio or the difference between
measured offset and predicted offset is larger than the increase in
delay. In the allowed delay increase is included also skew and maximum
clock frequency error.
Miroslav Lichvar [Wed, 13 Oct 2010 14:49:28 +0000 (16:49 +0200)]
Base poll adjustment on number of sourcestats samples
Instead of following skew changes, adjust polling interval so that the
number of measurements used in the regression algorithm remains close to
a target value. It can be configured with a new polltarget option
(6 by default).
Miroslav Lichvar [Tue, 17 Aug 2010 14:40:25 +0000 (16:40 +0200)]
Extend runs test
Double the number of samples that are used in the runs test. E.g. with 64
samples in regression the runs test will be tried over the 64 samples and
up to 64 previous samples. The minimum number of samples in now 4.
This improves the response with low-mid jitters by about 50%.
Miroslav Lichvar [Wed, 11 Aug 2010 16:45:17 +0000 (18:45 +0200)]
Regenerate critical values for number of runs
Generate more values to allow regression with 128 samples. Possibly a
different approach was used to generate the values, or the previous table
was actually using 11% critical region and had an extra value in the
12th place.