]> 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 08:38:06 +0000 (10:38 +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 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

index 2838b28fce54f592e52569cea897af0931748ce1..dfb6f0e86b0a1235354a1e0cdf17af0173c6c4ca 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index f809d04d9998d78ad840a19410fbf5121c35a753..15b23c4decaffe0ead9236df94ed3a51dc1eafe8 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 0a4892599c374b0b78ac3490984747ecd1072883..d1c5fa0afe9bbf65e8ab6d3a038905311a461d08 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 8794cbbd956cfa803b11ee42d107e30d17d89b77..df1656f733ae115024221a9bdb39b48e2ef6f742 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index ecd758c1a6bb04646e145eb9131c9a696eacb7f7..0aed3b5f3418c3d3278da38f117e1afc3a2ae1b3 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index e5c88284fd9bf4beab3fb30162455f2617ecc31f..a6a6ff69bd8056cc06cb44a2735d0cdf950537c6 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 0b5352001891cbb1822ec9b36fdb5e8020c29200..cd37c95eeaefb50b466d2568d05f57c9134863f9 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 56e17b3820c806a746e784107b000da82d77a4bf..aa1afd6ff474ad530f0341c7d85cc8b63bddbdb2 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index 93e6a2c712ac0541bdc9f4e5377e6fdb409b6b2f..e39ef106e58e65c0f3e00bc00e53221bf6d660b4 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index ebf17659d6030be2e26c03329e7c92cdf743112a..2e835310893408c9244d611f9b8cd92c141dd77d 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {
index a9161c0f75d4c7fa21d8565d6ec421c85140d663..f86583bf4872c846fe2d732b6cdd3c7cd44d04fb 100644 (file)
@@ -22,6 +22,7 @@ options {
        recursion no;
        dnssec-validation no;
        geoip-directory "../data";
+       max-cache-size 1M;
 };
 
 key rndc_key {