PowerDNS Blog

Simple TCP/IP DNS benchmarking tool | PowerDNS Blog

Written by Peter van Dijk | Jun 25, 2013 4:00:00 AM

In our work, we frequently find that we need tools to do specific tests. Today, because of a query from one of our users, we wrote a new tool to cover such a need: TCP DNS benchmarking.

It is not very sophisticated, but it does the job. We’ve learned that PowerDNS does around 20000 TCP/IP queries/second out of the box on a few years old server, a number we did not previously know.

From the manpage:

dnstcpbench reads DNS queries from standard input and sends them out
in parallel to a remote nameserver. By default TCP/IP is used, but
optionally, UDP is tried first, which allows for the benchmarking of
TCP/IP fallback.

The input format is one query per line: qname single-space qtype. An
example:
        www.powerdns.com ANY
        powerdns.com MX

You can read the manual page on GitHub.

The tool is included in our GitHub master branch.

Here are the build dependencies for Debian 7:

apt-get install autoconf automake bison flex g++ libboost-all-dev libtool
make pkg-config ragel

To compile:

$ git clone https://github.com/PowerDNS/pdns.git
$ cd pdns
$ ./bootstrap
$ ./configure --with-modules="" --without-lua
$ cd pdns
$ make dnstcpbench

Good luck & please let us know your thoughts & suggestions!