mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Merge branch '2075-add-T-maxcachesize-command-line-option' into 'main'
Add "-T maxcachesize=..." command line option Closes #2075 See merge request isc-projects/bind9!4043
This commit is contained in:
commit
fcd6962e8b
@ -143,6 +143,7 @@ EXTERN bool named_g_memstatistics INIT(false);
|
||||
EXTERN bool named_g_keepstderr INIT(false);
|
||||
|
||||
EXTERN unsigned int named_g_tat_interval INIT(24 * 3600);
|
||||
EXTERN unsigned int named_g_maxcachesize INIT(0);
|
||||
|
||||
#if defined(HAVE_GEOIP2)
|
||||
EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL);
|
||||
|
@ -650,6 +650,8 @@ parse_T_opt(char *option) {
|
||||
named_g_nosyslog = true;
|
||||
} else if (!strcmp(option, "notcp")) {
|
||||
notcp = true;
|
||||
} else if (!strncmp(option, "maxcachesize=", 13)) {
|
||||
named_g_maxcachesize = atoi(option + 13);
|
||||
} else if (!strcmp(option, "maxudp512")) {
|
||||
maxudp = 512;
|
||||
} else if (!strcmp(option, "maxudp1460")) {
|
||||
|
@ -4114,7 +4114,16 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "max-cache-size", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (cfg_obj_isstring(obj)) {
|
||||
/*
|
||||
* If "-T maxcachesize=..." is in effect, it overrides any other
|
||||
* "max-cache-size" setting found in configuration, either implicit or
|
||||
* explicit. For simplicity, the value passed to that command line
|
||||
* option is always treated as the number of bytes to set
|
||||
* "max-cache-size" to.
|
||||
*/
|
||||
if (named_g_maxcachesize != 0) {
|
||||
max_cache_size = named_g_maxcachesize;
|
||||
} else if (cfg_obj_isstring(obj)) {
|
||||
str = cfg_obj_asstring(obj);
|
||||
INSIST(strcasecmp(str, "unlimited") == 0);
|
||||
max_cache_size = 0;
|
||||
|
@ -1,2 +1,2 @@
|
||||
# this server runs named with only one worker thread
|
||||
-m record,size,mctx -c named.conf -d 99 -D additional-ns1 -X named.lock -g -n 1
|
||||
-m record,size,mctx -c named.conf -d 99 -D additional-ns1 -X named.lock -g -n 1 -T maxcachesize=2097152
|
||||
|
@ -1,2 +1,2 @@
|
||||
# this server only has 127.0.0.1 in its localhost/localnets ACLs
|
||||
-m record,size,mctx -c named.conf -d 99 -D allow-query-ns3 -X named.lock -g -T fixedlocal
|
||||
-m record,size,mctx -c named.conf -d 99 -D allow-query-ns3 -X named.lock -g -T maxcachesize=2097152 -T fixedlocal
|
||||
|
@ -18,7 +18,6 @@ options {
|
||||
listen-on { 10.53.0.2; };
|
||||
listen-on-v6 { none; };
|
||||
notify yes;
|
||||
max-cache-size 80%;
|
||||
disable-empty-zone 127.IN-ADDR.ARPA;
|
||||
recursion yes;
|
||||
dnssec-validation yes;
|
||||
|
@ -1 +1 @@
|
||||
-D delzone-ns2 -X named.lock -m record,size,mctx -c named.conf -g -U 4
|
||||
-D delzone-ns2 -X named.lock -m record,size,mctx -c named.conf -g -U 4 -T maxcachesize=2097152
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dnssec-ns6 -X named.lock -g -T nonearest -T tat=1
|
||||
-m record,size,mctx -c named.conf -d 99 -D dnssec-ns6 -X named.lock -g -T maxcachesize=2097152 -T nonearest -T tat=1
|
||||
|
@ -1,2 +1,2 @@
|
||||
# Using "-n 1" allows GL #1795 to be reliably reproduced
|
||||
-D dnstap-ns3 -X named.lock -m record,size,mctx -c named.conf -d 99 -g -U 4 -n 1
|
||||
-D dnstap-ns3 -X named.lock -m record,size,mctx -c named.conf -d 99 -g -U 4 -n 1 -T maxcachesize=2097152
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns1 -X named.lock -g -U 4 -T dscp=46
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns1 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns2 -X named.lock -g -U 4 -T dscp=46
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns2 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns3 -X named.lock -g -U 4 -T dscp=46
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns3 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns4 -X named.lock -g -U 4 -T dscp=46
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns4 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns5 -X named.lock -g -U 4 -T dscp=46
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns5 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns6 -X named.lock -g -U 4 -T dscp=46
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns6 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns7 -X named.lock -g -U 4 -T dscp=46
|
||||
-m record,size,mctx -c named.conf -d 99 -D dscp-ns7 -X named.lock -g -U 4 -T maxcachesize=2097152 -T dscp=46
|
||||
|
@ -1 +1 @@
|
||||
-D dupsigs-ns1 -X named.lock -m record,size,mctx -c named.conf -d 99 -g -U 4 -T sigvalinsecs
|
||||
-D dupsigs-ns1 -X named.lock -m record,size,mctx -c named.conf -d 99 -g -U 4 -T maxcachesize=2097152 -T sigvalinsecs
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -27,7 +27,6 @@ options {
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
blackhole { blocking; };
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -22,7 +22,6 @@ options {
|
||||
recursion no;
|
||||
dnssec-validation no;
|
||||
geoip-directory "../data";
|
||||
max-cache-size 1M;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns4 -X named.lock -g -U 4 -T noedns
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns4 -X named.lock -g -U 4 -T maxcachesize=2097152 -T noedns
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns5 -X named.lock -g -U 4 -T noedns
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns5 -X named.lock -g -U 4 -T maxcachesize=2097152 -T noedns
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns6 -X named.lock -g -U 4 -T maxudp512
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns6 -X named.lock -g -U 4 -T maxcachesize=2097152 -T maxudp512
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns7 -X named.lock -g -U 4 -T maxudp512
|
||||
-m record,size,mctx -c named.conf -d 99 -D legacy-ns7 -X named.lock -g -U 4 -T maxcachesize=2097152 -T maxudp512
|
||||
|
@ -1 +1 @@
|
||||
-D mirror-ns3 -X named.lock -m record,size,mctx -c named.conf -d 99 -g -U 4 -T tat=3
|
||||
-D mirror-ns3 -X named.lock -m record,size,mctx -c named.conf -d 99 -g -U 4 -T maxcachesize=2097152 -T tat=3
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D mkeys-ns2 -X named.lock -g -T mkeytimers=5/10/20 -T tat=1
|
||||
-m record,size,mctx -c named.conf -d 99 -D mkeys-ns2 -X named.lock -g -T maxcachesize=2097152 -T mkeytimers=5/10/20 -T tat=1
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D mkeys-ns3 -X named.lock -g -T mkeytimers=5/10/20
|
||||
-m record,size,mctx -c named.conf -d 99 -D mkeys-ns3 -X named.lock -g -T maxcachesize=2097152 -T mkeytimers=5/10/20
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g -T maxcachesize=2097152
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g -T mkeytimers=2/20/40
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g -T maxcachesize=2097152 -T mkeytimers=2/20/40
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g -T mkeytimers=5/10/20
|
||||
-m record,size,mctx -c named.conf -d 99 -X named.lock -g -T maxcachesize=2097152 -T mkeytimers=5/10/20
|
||||
|
@ -1 +1 @@
|
||||
-D nsupdate-ns5 -m record,size,mctx -c named.conf -d 99 -X named.lock -g -U 4 -T fixedlocal
|
||||
-D nsupdate-ns5 -m record,size,mctx -c named.conf -d 99 -X named.lock -g -U 4 -T maxcachesize=2097152 -T fixedlocal
|
||||
|
@ -1 +1 @@
|
||||
-D nsupdate-ns6 -m record,size,mctx -c named.conf -d 99 -X named.lock -g -U 4 -T fixedlocal
|
||||
-D nsupdate-ns6 -m record,size,mctx -c named.conf -d 99 -X named.lock -g -U 4 -T maxcachesize=2097152 -T fixedlocal
|
||||
|
@ -1,3 +1,3 @@
|
||||
# teardown of a huge zone with tracing enabled takes way too long
|
||||
# -m none is set so that stop.pl does not timeout
|
||||
-D rndc-ns6 -X named.lock -m none -c named.conf -d 99 -g -U 4
|
||||
-D rndc-ns6 -X named.lock -m none -c named.conf -d 99 -g -U 4 -T maxcachesize=2097152
|
||||
|
@ -1,2 +1,2 @@
|
||||
# run the performance test close to real life
|
||||
-c named.conf -D rpz-ns5 -X named.lock -gd3
|
||||
-c named.conf -D rpz-ns5 -X named.lock -gd3 -T maxcachesize=2097152
|
||||
|
@ -1 +1 @@
|
||||
-m record,size,mctx -c named.conf -d 99 -D rpzextra-ns1 -X named.lock -U 4
|
||||
-m record,size,mctx -c named.conf -d 99 -D rpzextra-ns1 -X named.lock -U 4 -T maxcachesize=2097152
|
||||
|
@ -268,7 +268,7 @@ sub construct_ns_command {
|
||||
}
|
||||
}
|
||||
|
||||
$command .= "-c named.conf -d 99 -g -U 4";
|
||||
$command .= "-c named.conf -d 99 -g -U 4 -T maxcachesize=2097152";
|
||||
}
|
||||
|
||||
if (-e "$testdir/$server/named.notcp") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user