]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Run more variations of rec bulk test and also do two runs: one to
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 9 Dec 2019 10:55:51 +0000 (11:55 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 4 Mar 2020 09:27:18 +0000 (10:27 +0100)
warm the record cache and a second to use it

.circleci/config.yml
regression-tests/recursor-test

index 5cbe3f85368a31364cce9fc30e3af1e793152dcb..27fbf75fb1ab66eed890fed636a2795d55e0dfef 100644 (file)
@@ -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:
index df2a2964fb16ec02baa4b3e1649b4ab340bc5d3a..32e35de2115573543a0f3aeded21b511a9419253 100755 (executable)
@@ -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
 <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=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