Enable the implicit "max-cache-size 90%;" default to be overridden
!3865 (merged) caused RBT hash tables to be pre-allocated. This makes named
use more memory immediately from startup; how much more memory it uses
depends on the size of memory available on the host as the default value
of max-cache-size
is 90%
(and the hash table size is derived from
that value).
This is not expected to cause problems on systems which run a single instance of BIND, but it may trigger memory use issues e.g. on CI hosts, which run numerous instances of BIND in parallel and each of these instances assumes it is okay for it to use all of the memory available on the host. The most prominent display of that problem was addressed by !3919 (merged), but certain issues are still manifesting themselves intermittently - most notably, the FreeBSD QEMU VMs are often being killed off, which causes the FreeBSD GitLab CI jobs to appear to be hung, e.g.:
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1082066
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1082411
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1082632
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1082794
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1083286
- https://gitlab.isc.org/isc-projects/bind9/-/jobs/1083287
Since named
instances used in BIND system tests do not really need
large caches, what would address these memory use issues is a way of
overriding the default max-cache-size 90%;
setting present in
bin/named/config.c
. Any mechanism implemented for that purpose would
still need to honor explicit max-cache-size
settings present in
named.conf
.