Simple TCP/IP DNS benchmarking tool

Jun 25, 2013

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!

About the author

Peter van Dijk

Peter van Dijk

Senior Developer at PowerDNS

Related Articles

PowerDNS Authoritative Server 4.5.0-RC2

Hello! Today we released the second, and hopefully last, Release Candidate for Authoritative Server version 4.5.0. Please...

Peter van Dijk 07/3/21

PowerDNS Authoritative Server 4.5.0-RC1

Hello! Today we released the first Release Candidate for Authoritative Server version 4.5.0. Please try it! Version 4.5.0...

Peter van Dijk 06/6/21

PowerDNS Authoritative 4.3.0-beta1

Hello! We are proud to announce the first beta release of what should become PowerDNS Authoritative 4.3.0. So far this is...

Peter van Dijk 01/6/20

PowerDNS Authoritative 4.3.0 Beta 2

Hello! We are proud to announce the second, and hopefully last, beta release of what should become PowerDNS Authoritative...

Peter van Dijk 02/6/20