]> git.ipfire.org Git - thirdparty/bind9.git/commit
Set "max-cache-size" in the "geoip2" system test
authorMichał Kępień <michal@isc.org>
Wed, 5 Aug 2020 07:04:53 +0000 (09:04 +0200)
committerMichał Kępień <michal@isc.org>
Wed, 5 Aug 2020 08:38:06 +0000 (10:38 +0200)
commit4292d5bdfe6a0ff1de64e0aee6cb3975dd7ef085
treeec4849001b9a58378de7640b55f4521b29c1bcdc
parent550b82e27b45dcfdc9127ab7181caf55573b9ec0
Set "max-cache-size" in the "geoip2" system test

The named configuration files used in the "geoip2" system test cause a
rather large number of views (6-8) to be set up in each tested named
instance.  Each view has its own cache.

Commit e24bc324b455d9cad7b51acd3d5c7b4e40c66187 caused the RBT hash
table to be pre-allocated to a size derived from "max-cache-size", so
that it never needs to be rehashed.  The size of that hash table is not
expected to be significant enough to cause memory use issues in typical
conditions even for large "max-cache-size" settings.

However, these two factors combined can cause memory exhaustion issues
in GitLab CI, where we run multiple "instances" of the test suite in
parallel on the same runner, each test suite executes multiple system
tests concurrently, and each system test may potentially start multiple
named instances at the same time.  In practice, this problem currently
only seems to be affecting the "geoip2" system test, which is failing
intermittently due to named instances used by that test getting killed
by oom-killer.

Prevent the "geoip2" system test from failing intermittently by setting
"max-cache-size" in named configuration files used in that test to a low
value in order to keep memory usage at bay even with a large number of
views configured.
12 files changed:
bin/tests/system/geoip2/ns2/named1.conf.in
bin/tests/system/geoip2/ns2/named10.conf.in
bin/tests/system/geoip2/ns2/named11.conf.in
bin/tests/system/geoip2/ns2/named12.conf.in
bin/tests/system/geoip2/ns2/named2.conf.in
bin/tests/system/geoip2/ns2/named3.conf.in
bin/tests/system/geoip2/ns2/named4.conf.in
bin/tests/system/geoip2/ns2/named5.conf.in
bin/tests/system/geoip2/ns2/named6.conf.in
bin/tests/system/geoip2/ns2/named7.conf.in
bin/tests/system/geoip2/ns2/named8.conf.in
bin/tests/system/geoip2/ns2/named9.conf.in