From: Otto Moerbeek Date: Mon, 16 Dec 2019 09:02:33 +0000 (+0100) Subject: Run tests with different shard settings X-Git-Tag: dnsdist-1.5.0-alpha1~21^2^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=359d6c17ac55b4350fe23273e8e3c7ddee390f01;p=thirdparty%2Fpdns.git Run tests with different shard settings --- diff --git a/.circleci/config.yml b/.circleci/config.yml index f95b55346b..e5f2f928b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1042,6 +1042,116 @@ jobs: TRACE=no \ ./timestamp ./recursor-test 5300 50000 16 4096 workdir: ~/project/regression-tests + - run: + name: Run bulktest I + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 1 + workdir: ~/project/regression-tests + - run: + name: Run bulktest J + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 2 + workdir: ~/project/regression-tests + - run: + name: Run bulktest K + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 4 + workdir: ~/project/regression-tests + - run: + name: Run bulktest L + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 8 + workdir: ~/project/regression-tests + - run: + name: Run bulktest M + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 16 + workdir: ~/project/regression-tests + - run: + name: Run bulktest M + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 32 + workdir: ~/project/regression-tests + - run: + name: Run bulktest N + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 64 + workdir: ~/project/regression-tests + - run: + name: Run bulktest O + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 128 + workdir: ~/project/regression-tests + - run: + name: Run bulktest P + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 256 + workdir: ~/project/regression-tests + - run: + name: Run bulktest Q + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 512 + workdir: ~/project/regression-tests + - run: + name: Run bulktest R + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + RECCONTROL=/opt/pdns-recursor/bin/rec_control \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 1024 + workdir: ~/project/regression-tests test-recursor-api: resource_class: small diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index a6e5c52525..8ad11b56ac 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -4792,7 +4792,7 @@ int main(int argc, char **argv) ::arg().setSwitch("qname-minimization", "Use Query Name Minimization")="yes"; ::arg().setSwitch("nothing-below-nxdomain", "When an NXDOMAIN exists in cache for a name with fewer labels than the qname, send NXDOMAIN without doing a lookup (see RFC 8020)")="dnssec"; ::arg().set("max-generate-steps", "Maximum number of $GENERATE steps when loading a zone from a file")="0"; - ::arg().set("record-cache-shards", "Number of shards in the record cache")="1024"; + ::arg().set("cache-shards", "Number of shards in the record cache")="1024"; #ifdef NOD_ENABLED ::arg().set("new-domain-tracking", "Track newly observed domains (i.e. never seen before).")="no"; @@ -4891,8 +4891,8 @@ int main(int argc, char **argv) exit(0); } - s_RC = std::unique_ptr(new MemRecursorCache(::arg().asNum("record-cache-shards"))); - + s_RC = std::unique_ptr(new MemRecursorCache(::arg().asNum("cache-shards"))); + Logger::Urgency logUrgency = (Logger::Urgency)::arg().asNum("loglevel"); if (logUrgency < Logger::Error) diff --git a/regression-tests/recursor-test b/regression-tests/recursor-test index 9a8ebfed30..4d38c9fc67 100755 --- a/regression-tests/recursor-test +++ b/regression-tests/recursor-test @@ -7,6 +7,8 @@ threads=$3 [ -z "$threads" ] && threads=2 mthreads=$4 [ -z "$mthreads" ] && mthreads=100 +shards=$5 +[ -z "$shards" ] && shards=1024 : ${RECURSOR:="../pdns/recursordist/pdns_recursor"} : ${RECCONTROL:="../pdns/recursordist/rec_control"} @@ -29,24 +31,24 @@ rm -f recursor.pid pdns_recursor.pid system CPU seconds%S wallclock seconds%e %% CPU used%P -' ${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --max-mthreads=$mthreads --query-local-address6="${QLA6}" --threads=$threads --disable-packetcache > recursor.log 2>&1 & +' ${RECURSOR} --daemon=no --local-port=$port --socket-dir=./ --trace=$TRACE --config-dir=. --max-mthreads=$mthreads --query-local-address6="${QLA6}" --threads=$threads --cache-shards=$shards --disable-packetcache > recursor.log 2>&1 & sleep 3 # warm up the cache echo -echo === First run with limit=$limit threads=$threads mthreads=$mthreads === +echo === First run with limit=$limit threads=$threads mthreads=$mthreads shards=$shards === ${DNSBULKTEST} --www=false -qe 127.0.0.1 $port $limit < ${CSV} > bulktest.results kill -USR1 $(cat pdns_recursor.pid) ${RECCONTROL} --socket-dir=. --config-dir=. get-all # rerun 1 with hot cache echo -echo === Second run with limit=$limit threads=$threads mthreads=$mthreads === +echo === Second run with limit=$limit threads=$threads mthreads=$mthreads shards=$shards === ${DNSBULKTEST} --www=false -qe 127.0.0.1 $port $limit < ${CSV} > bulktest.results kill -USR1 $(cat pdns_recursor.pid) ${RECCONTROL} --socket-dir=. --config-dir=. get-all # rerun 2 with hot cache echo -echo === Third run with limit=$limit threads=$threads mthreads=$mthreads === +echo === Third run with limit=$limit threads=$threads mthreads=$mthreads shards=$shards === ${DNSBULKTEST} --www=false -qe 127.0.0.1 $port $limit < ${CSV} > bulktest.results kill -USR1 $(cat pdns_recursor.pid) ${RECCONTROL} --socket-dir=. --config-dir=. get-all