-- KurtBaumann - 2015-10-18

PERT Case 19.03.2015

Author: Daniel Stirnimann (SWITCH)

Motivation for Performance Tests

With major changes in our server configuration or because of new hardware we regularly perform DNS performance tests on our authoritative only name servers. If the performance tests are conducted in a similar manner we get an indication of how well a specific platform performs.

Tools

Typically we use queryperf from the BIND source package (in the contrib directory) to measure UDP query performance. There are other tools such as dnstcpbench from PowerDNS to measure tcp performance and possible more. "queryperf" requires an input file consisting of lines with a query-name and a query-type. A typical line would be " www.switch.ch A". We generate the input file from historic queries which have been sent to the authoritative only name server. While the query names and query types mimic real world data, the sent DNS queries do in fact not. We typicallytest without EDNS0 and DNSSEC OK bit set.

queryperf usage:

DNS Query Performance Testing Tool

Version: $Id: DNSPerformanceTests.txt,v 1.2 2016/06/03 10:46:19 KurtBaumann Exp $

Usage: queryperf

  • [-d datafile] [-s server_addr] [-p port]
  • [-q num_queries] [-b bufsize] [-t timeout] [-n]
  • [-l limit] [-f family] [-1] [-i interval]
  • [-r arraysize] [-u unit] [-H histfile] [-T qps] [-e]
  • [-D] [-R] [-c] [-v] [-h]

  • -d specifies the input data file (default: stdin)
  • -s sets the server to query (default: 127.0.0.1)
  • -p sets the port on which to query the server (default: 53)
  • -q specifies the maximum number of queries outstanding (default: 20)
  • -t specifies the timeout for query completion in seconds (default: 5)
  • -n causes configuration changes to be ignored
  • -l specifies how a limit for how long to run tests in seconds (no default)
  • -I run through input only once (default: multiple iff limit given)
  • -b set input/output buffer size in kilobytes (default: 32 k)
  • -i specifies interval of intermediate outputs in seconds (default 0=none)
  • -f specify address family of DNS transport, inet or inet6 (default any)
  • -r set RTT statistics array size (default: 50000)
  • -u set RTT statistics time unit in usec (default: 100)
  • -H specifies RTT histogram data file (default: none)
  • -T specify the target qps (default: 0=unspecified)
  • -e enable EDNS 0
  • -D set the DNSSEC OK bit (implies EDNS)
  • -R disable recursion
  • -c print the number of packets with each rcode
  • -v verbose: report the RCODE of each response on stdout
  • -h print this usage

Test Preparation

Different server configurations can lead to different results. All our servers run local firewalls. However, we use stateless rules for DNS and even make use of the "raw" table in iptables to avoid connection tracking. If the server is logging DNS queries in some form (PCAP or query logging through the name server software) that can have a big impact as well.

The test client needs to be selected carefully as well. Latency has an impact on the performance. It's best to select the client close to the server network wise. If that is not possible then adjusting the maximum value for the queue of outstanding queries (see -q) can help a little as well.

Test Result

We typically run queryperf with the following switches:

  • -s <server ip>
  • -d <query data>
  • -l 30 # time limit for the test run
queryperf reports the following output after each test:

./queryperf

DNS Query Performance Testing Tool:

Statistics:

  • Parse input file: once
  • Ended due to: reaching end of file
  • Queries sent: 0 queries
  • Queries completed: 0 queries
  • Queries lost: 0 queries
  • Queries delayed(?): 0 queries

  • RTT max: -1.000000 sec
  • RTT min: -1.000000 sec
  • RTT average: 0.000000 sec
  • RTT std deviation: 0.000000 sec
  • RTT out of range: 0 queries
Percentage completed: 0.00%

Percentage lost: 0.00%

Started at:

  • Thu Mar 19 10:38:45 2015
Finished at:

  • Thu Mar 19 10:38:47 2015
Ran for:

  • 0.000000 seconds
Queries per second: 0.000000 qps

The RTT (round trip time) values are of great importance. Keep this values together with the "Queries per second" number to compare your results to previous results.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2016-06-03 - KurtBaumann
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2004-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.