A DNS performance tool.
Dnsperf is a single-process dns load testing and benchmarking utility. It was designed to measure the performance of your DNS Server or Local DNS Server by send a configured number of queries. Performance measures contains elapsed time, its transation rate, its concurrrency and the percentage of successful queries. These measures are reported at the end of each testing.
Dnsperf supports the following command line options:
Specifies the DNS server's IP address. The default IP is
-p Specifies the DNS server's port. The default Port is
-d Specifies the input data file. Input data file contains
query domain and
-t Specifies the timeout for query completion in millisecond. The default timeout is
-Q Specifies the max number of queries to be send. The default number is
-c Specifies the number of concurrent queries. The default number is
100. Dnsperf will randomly pick a
query domain from data file as QNAME.
-l Specifies how long to run tests in seconds. The default number is infinite.
-e This will sets the real client IP in query string following the rules defined in edns-client-subnet.
Specifies interval of queries in seconds. The default number is zero. This option is not supported currently.
-P Specifies the transport layer protocol to send DNS queries,
tcp. As we know, although UDP is the suggested protocol, DNS queries can be send either by UDP or TCP. The default is
tcp is not supported currently, and it is coming soon.
-f Specify address family of DNS transport,
inet6. The default is
inet6 is not supported currently.
-v Verbose: report the RCODE of each response on stdout.
-h Print the usage of dnsperf.
Data file format
An example of data file format is shown in file
a.out in project directory.
In the file, the line begin with
# is recgonized as comment. Each useful line contains two columns. The first column is the
domain name to be queried, and the second column is the
query type currently supported includes:
Performance statistics will displayed on your
stdin after testing. The following is a sample outputs.
DNS Performance Testing Tool [Status] Processing query data [Status] Sending queries to 127.0.0.1:53 time up [Status]DNS Query Performance Testing Finish [Result]Queries sent: 35650 [Result]Queries completed: 35578 [Result]Complete percentage: 99.80% [Result]Elapsed time(s): 1.00000 [Result]Queries Per Second: 35650.0000
The outputs is easy to comprehend.