+15 May 2018: Wouter
+ - Fix low-rtt-pct to low-rtt-permil, as it is parts in one thousand.
+
11 May 2018: Wouter
- Fix contrib/libunbound.pc for libssl libcrypto references,
from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226914
# low-rtt: 45
# select low rtt this many times out of 1000. 0 means the fast server
# select is disabled. prefetches are not sped up.
- # low-rtt-pct: 0
+ # low-rtt-permil: 0
# Specific options for ipsecmod. unbound needs to be configured with
# --enable-ipsecmod for these to take effect.
.TP 5
.B low\-rtt: \fI<msec time>
Set the time in millisecond that is considere a low ping time for fast
-server selection with the low\-rtt\-pct option, that turns this on or off.
+server selection with the low\-rtt\-permil option, that turns this on or off.
The default is 45 msec, a number from IPv6 quick response documents.
.TP 5
-.B low\-rtt\-pct: \fI<number>
+.B low\-rtt\-permil: \fI<number>
Specify how many times out of 1000 to pick the fast server from the low
rtt band. 0 turns the feature off. A value of 900 would pick the fast
server when such fast servers are available 90 percent of the time, and
moment to perform server exploration. The low\-rtt option can be used
to specify which servers are picked for fast server selection, servers
with a ping roundtrip time below that value are considered.
-The default for low\-rtt\-pct is 0.
+The default for low\-rtt\-permil is 0.
.SS "Remote Control Options"
In the
.B remote\-control:
return 0 to force the caller to fetch more */
}
- if(env->cfg->low_rtt_pct != 0 && prefetch == 0 &&
+ if(env->cfg->low_rtt_permil != 0 && prefetch == 0 &&
low_rtt < env->cfg->low_rtt &&
- ub_random_max(env->rnd, 1000) < env->cfg->low_rtt_pct) {
+ ub_random_max(env->rnd, 1000) < env->cfg->low_rtt_permil) {
/* the query is not prefetch, but for a downstream client,
* there is a low_rtt (fast) server. We choose that x% of the
* time */
if(!(cfg->logfile = strdup(""))) goto error_exit;
if(!(cfg->pidfile = strdup(PIDFILE))) goto error_exit;
if(!(cfg->target_fetch_policy = strdup("3 2 1 0 0"))) goto error_exit;
- cfg->low_rtt_pct = 0;
+ cfg->low_rtt_permil = 0;
cfg->low_rtt = 45;
cfg->donotqueryaddrs = NULL;
cfg->donotquery_localhost = 1;
else S_NUMBER_OR_ZERO("ip-ratelimit-factor:", ip_ratelimit_factor)
else S_NUMBER_OR_ZERO("ratelimit-factor:", ratelimit_factor)
else S_NUMBER_OR_ZERO("low-rtt:", low_rtt)
- else S_NUMBER_OR_ZERO("low-rtt-pct:", low_rtt_pct)
+ else S_NUMBER_OR_ZERO("low-rtt-pct:", low_rtt_permil)
+ else S_NUMBER_OR_ZERO("low-rtt-permil:", low_rtt_permil)
else S_YNO("qname-minimisation:", qname_minimisation)
else S_YNO("qname-minimisation-strict:", qname_minimisation_strict)
#ifdef USE_IPSECMOD
else O_DEC(opt, "ip-ratelimit-factor", ip_ratelimit_factor)
else O_DEC(opt, "ratelimit-factor", ratelimit_factor)
else O_DEC(opt, "low-rtt", low_rtt)
- else O_DEC(opt, "low-rtt-pct", low_rtt_pct)
+ else O_DEC(opt, "low-rtt-pct", low_rtt_permil)
+ else O_DEC(opt, "low-rtt-permil", low_rtt_permil)
else O_DEC(opt, "val-sig-skew-min", val_sig_skew_min)
else O_DEC(opt, "val-sig-skew-max", val_sig_skew_max)
else O_YNO(opt, "qname-minimisation", qname_minimisation)
/** the target fetch policy for the iterator */
char* target_fetch_policy;
/** percent*10, how many times in 1000 to pick low rtt destinations */
- int low_rtt_pct;
+ int low_rtt_permil;
/** what time in msec is a low rtt destination */
int low_rtt;
ip-ratelimit-factor{COLON} { YDVAR(1, VAR_IP_RATELIMIT_FACTOR) }
ratelimit-factor{COLON} { YDVAR(1, VAR_RATELIMIT_FACTOR) }
low-rtt{COLON} { YDVAR(1, VAR_LOW_RTT) }
-low-rtt-pct{COLON} { YDVAR(1, VAR_LOW_RTT_PCT) }
+low-rtt-pct{COLON} { YDVAR(1, VAR_LOW_RTT_PERMIL) }
+low-rtt-permil{COLON} { YDVAR(1, VAR_LOW_RTT_PERMIL) }
response-ip-tag{COLON} { YDVAR(2, VAR_RESPONSE_IP_TAG) }
response-ip{COLON} { YDVAR(2, VAR_RESPONSE_IP) }
response-ip-data{COLON} { YDVAR(2, VAR_RESPONSE_IP_DATA) }
%token VAR_CACHEDB_REDISHOST VAR_CACHEDB_REDISPORT VAR_CACHEDB_REDISTIMEOUT
%token VAR_UDP_UPSTREAM_WITHOUT_DOWNSTREAM VAR_FOR_UPSTREAM
%token VAR_AUTH_ZONE VAR_ZONEFILE VAR_MASTER VAR_URL VAR_FOR_DOWNSTREAM
-%token VAR_FALLBACK_ENABLED VAR_ADDITIONAL_TLS_PORT VAR_LOW_RTT VAR_LOW_RTT_PCT
+%token VAR_FALLBACK_ENABLED VAR_ADDITIONAL_TLS_PORT VAR_LOW_RTT VAR_LOW_RTT_PERMIL
%token VAR_ALLOW_NOTIFY
%%
server_ipsecmod_whitelist | server_ipsecmod_strict |
server_udp_upstream_without_downstream | server_aggressive_nsec |
server_tls_cert_bundle | server_additional_tls_port | server_low_rtt |
- server_low_rtt_pct
+ server_low_rtt_permil
;
stubstart: VAR_STUB_ZONE
{
free($2);
}
;
-server_low_rtt_pct: VAR_LOW_RTT_PCT STRING_ARG
+server_low_rtt_permil: VAR_LOW_RTT_PERMIL STRING_ARG
{
- OUTYY(("P(server_low_rtt_pct:%s)\n", $2));
+ OUTYY(("P(server_low_rtt_permil:%s)\n", $2));
if(atoi($2) == 0 && strcmp($2, "0") != 0)
yyerror("number expected");
- else cfg_parser->cfg->low_rtt_pct = atoi($2);
+ else cfg_parser->cfg->low_rtt_permil = atoi($2);
free($2);
}
;