Skip to content
Snippets Groups Projects
Nicki Křížek's avatar
Nicki Křížek authored
This commit is a huge un-merged work in progress mess, but the configs
(with minor changes for each tests) are what was used for the CSNOG 2020
measurements.
9c4ec43a
History

Tools for DNS resolvers benchmarking

Shotgun Usage

  • Edit hosts_shotgun
  • Use scripts/shotgun.sh to execute the tests, modify variables as needed

Dnsperf Usage

Make sure to initialize the repo with submodules:

$ git submodule update --init

Specifying the benchmark servers

In file hosts add/remove server or servers into iterator and dnsperf section. All ansible playbooks works with groups iterator and dnsperf.

Remove servers from the cluster

$ ansible-playbook remove-from-cluster.yaml

Run benchmark

unbound with default version:

$ ansible-playbook dnsperf.yaml --extra-vars resolver=unbound --extra-vars "query_file=$QUERY_FILE"

kresd with specific version:

$ ansible-playbook dnsperf.yaml --extra-vars resolver=kresd --extra-vars version=v4.2.2

Return servers to the cluster

$ ansible-playbook add-to-cluster.yaml

Configuration of the test

Edit playbook

You can edit all varibales in playbook dnsperf.yaml. Focus on this variables:

  • args in section kresd
  • args, loop_times and query_file in secrion dnsperf

or

Change playbook variables throught playbook arguments

Change query_file for example.

$ ansible-playbook dnsperf.yaml --extra-vars "query_file=qf/my_query_file"

Example

You can use example scripts/example.sh. But create the test files qf_1_2M and qf_100_2M before running this example.

Create the test files

Script scripts/gen-name-wildcard.py generate simply query file.

  1. Query file with 1 unique domain name (random_hash.spackovi.net), type record A and 2M of this record in file. Saved as query file qf_1_2M.
$ ./scripts/gen-name-wildcard.py -d spackovi.net. -r A -n 2000000 -u 1 && mv qf_1_2M ./files/qf/
  1. Query file with 100 unique domain names (100x random_hash.spackovi.net), type record A and 2M of this record in file. Saved as query file qf_100_2M.
$ ./scripts/gen-name-wildcard.py -d spackovi.net. -r A -n 2000000 -u 100 && mv qf_100_2M ./files/qf/

Run the example

Run the example by command scripts/example.sh.

This script run dnsperf.yaml playbook with query files qf_1_2M, qf_100_2M and default resolver and version. Default resolver defined variable resolver in file dnsperf.yaml. Version is defined in role of resolver (roles/kresd/defaults/main.yaml). Graphs are drawn by the script ./scripts/plot.py. Note that input of ./scripts/plot.py script is directory-depend. For more information explore all scripts mentioned above and dnsperf.yaml playbook.

Profiler Usage

Now you can profile just kresd with gperftools. Graphs plots FlameGraph.

Edit iterator hostname in hosts file and run profiler using:

$ ansible-playbook profiler.yaml

You can change number of samples per second in playbook via prof_frequency variable.

Results are stored in result/profiler directory.