]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Run tests with different shard settings
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 16 Dec 2019 09:02:33 +0000 (10:02 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 4 Mar 2020 09:27:19 +0000 (10:27 +0100)
.circleci/config.yml
pdns/pdns_recursor.cc
regression-tests/recursor-test

index f95b55346b80ddcb7dbbbc28abb111b05abec677..e5f2f928b0ed10ac73789aadd008325a30d2ec55 100644 (file)
@@ -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
index a6e5c525257685912d95d7de1a82f52b1073b8f1..8ad11b56ac62011df7edd1ae2cc2fff0bec15cae 100644 (file)
@@ -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<MemRecursorCache>(new MemRecursorCache(::arg().asNum("record-cache-shards")));
-    
+    s_RC = std::unique_ptr<MemRecursorCache>(new MemRecursorCache(::arg().asNum("cache-shards")));
+
     Logger::Urgency logUrgency = (Logger::Urgency)::arg().asNum("loglevel");
 
     if (logUrgency < Logger::Error)
index 9a8ebfed30e46838b9de69b6e1ead5b5084f38c7..4d38c9fc673636576bffad1170808f431f82143d 100755 (executable)
@@ -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
 <measurement><name>system CPU seconds</name><value>%S</value></measurement>
 <measurement><name>wallclock seconds</name><value>%e</value></measurement>
 <measurement><name>%% CPU used</name><value>%P</value></measurement>
-'         ${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