]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
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 09:08:24 +0000 (11:08 +0200)
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 aa72c31422bf04c34afd539dc9986a9bac976901 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.

(cherry picked from commit 4292d5bdfe6a0ff1de64e0aee6cb3975dd7ef085)

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

index 7d8ceb1d11cc75ba40a5e8b3c4c6caabd206d922..62ed7ab3fe1a0425138f25b9033ac9544cc762fc 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 9e12fe084c52c38569e7b4c9a38bfe2f2c338f47..b7f03cd3af77c25063d9abfa92b05a02c0d2413c 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 4ad1ad0bda45e9e643e0288927c34103bf773bb0..75cdbbf55737a35e08c0cabc0ee521fbe8d0509e 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index a968c8a91e1949054e2f47e5c417c0e1850c49e0..3fd54cb274ae97555a19677b6068d2a2ae5588f3 100644 (file)
@@ -27,6 +27,7 @@ options {
        dnssec-validation no;
        geoip-directory "../data";
        blackhole { blocking; };
+       max-cache-size 1M;
 };
 
 key rndc_key {
index b0c156407969ebb0c02f933572d629b567724042..8a7022b4a48842f40228b72f3dc64cb928546229 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index e275fe34241304feea57e697438365f330415b62..75758f6ee683932c556bf4bb25bb30a990ab9ef8 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index a3015d64f3a18347ecfd3ddb90091a1c218aefc8..917d744ed203e28f30e0c2e351bd656c01c3a7e4 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index c38e613d2f0b66ce097dd326fed44539021407d1..79f5909515e951334c95ca4758acbb2ddd54a483 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 3e95e70090a7e9f0ab38b2062c9a7b0233c03e78..4664b242b94af8fbd3855918329df3a528c22bf2 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 0674e75fbf88ecd16336d0e87987632123ff20fd..2cf06dd88031a00afd682f7f2d8de9743566c76e 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index a175cb9d25ae522d8a3315a4e97e0879935835c7..7e7559d3be6df075696c4f657a7e29bd9cb0ef53 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 41992e49bf15f9db589248e11ed26c754034b006..78c252da0fdbc6766309b781ccea7759d647245f 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {