From: Otto Moerbeek Date: Mon, 9 Dec 2019 10:55:51 +0000 (+0100) Subject: Run more variations of rec bulk test and also do two runs: one to X-Git-Tag: dnsdist-1.5.0-alpha1~21^2^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=045e4577b4653b9082e54b55238d0832aefabe36;p=thirdparty%2Fpdns.git Run more variations of rec bulk test and also do two runs: one to warm the record cache and a second to use it --- diff --git a/.circleci/config.yml b/.circleci/config.yml index 5cbe3f8536..27fbf75fb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -946,7 +946,7 @@ jobs: ./build-scripts/test-recursor test-recursor-bulk: - resource_class: small + resource_class: medium docker: - image: debian:buster @@ -963,14 +963,76 @@ jobs: curl -LO http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip && \ unzip top-1m.csv.zip -d . - run: - name: Run bulktests + name: Run bulktest A + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 2 + workdir: ~/project/regression-tests + - run: + name: Run bulktest B + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 4 + workdir: ~/project/regression-tests + - run: + name: Run bulktest C + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 + workdir: ~/project/regression-tests + - run: + name: Run bulktest D + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 16 + workdir: ~/project/regression-tests + - run: + name: Run bulktest E + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 2 4096 + workdir: ~/project/regression-tests + - run: + name: Run bulktest F + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 4 4096 + workdir: ~/project/regression-tests + - run: + name: Run bulktest G + command: | + DNSBULKTEST=/usr/bin/dnsbulktest \ + RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ + THRESHOLD=95 \ + TRACE=no \ + ./timestamp ./recursor-test 5300 50000 8 4096 + workdir: ~/project/regression-tests + - run: + name: Run bulktest H command: | DNSBULKTEST=/usr/bin/dnsbulktest \ RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \ THRESHOLD=95 \ TRACE=no \ - ./timestamp ./recursor-test 5300 50000 || \ - (cat recursor.log; false) + ./timestamp ./recursor-test 5300 50000 16 4096 workdir: ~/project/regression-tests test-recursor-api: diff --git a/regression-tests/recursor-test b/regression-tests/recursor-test index df2a2964fb..32e35de211 100755 --- a/regression-tests/recursor-test +++ b/regression-tests/recursor-test @@ -1,8 +1,12 @@ -#!/bin/bash -ex +#!/bin/bash -e port=$1 [ -z "$port" ] && port=5300 limit=$2 [ -z "$limit" ] && limit=100000 +threads=$3 +[ -z "$threads" ] && threads=2 +mthreads=$4 +[ -z "$mthreads" ] && mthreads=100 : ${RECURSOR:="../pdns/recursordist/pdns_recursor"} : ${CSV:="top-1m.csv"} @@ -24,12 +28,22 @@ 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=100 --query-local-address6="${QLA6}" > 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 --disable-packetcache > recursor.log 2>&1 & sleep 3 + +# warm up the cache +echo +echo === First run with limit=$limit threads=$threads mthreads=$mthreads === +${DNSBULKTEST} --www=false -qe 127.0.0.1 $port $limit < ${CSV} > bulktest.results +# rerun wit hot cache +echo +echo === Second run with limit=$limit threads=$threads mthreads=$mthreads === ${DNSBULKTEST} --www=false -qe 127.0.0.1 $port $limit < ${CSV} > bulktest.results -echo "==== RECURSOR LOG ===" + +echo +echo "=== RECURSOR LOG ===" cat recursor.log -echo "==== END RECURSOR LOG ===" +echo "=== END RECURSOR LOG ===" kill $(cat pdns_recursor.pid) sleep 5