dnstcpbench (1) - Linux Man Pages
dnstcpbench: tool to perform TCP benchmarking of nameservers
dnstcpbench - tool to perform TCP benchmarking of nameservers
dnstcpbench reads DNS queries (by default 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
When benchmarking extended runs, it may be necessary to enable TIME_WAIT recycling, as TCP/IP port tuples may otherwise run out. On Linux this is performed by running:
# echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
- Filename from which to read queries. Defaults to standard input if unspecified.
- Provide a helpful message
- Number of milliseconds to wait for an answer
- Attempt resolution via UDP first, only do TCP if truncated answer is received
- Be wordy on what the program is doing
- Number of parallel worker threads to use.
The program reports both mean and median numbers for queries per second and UDP and TCP latency. Each query only counts once, even if it is tried over UDP first. This effectively means that passing -u can lower query rates if many queries get shunted to TCP.
Currently the timeout code does not actually perform non-blocking connects or writes. So a slow connect or slow writes will still cause low performance and delays.
bert.hubert [at] netherlabs.nl
- mailto:bert.hubert [at] netherlabs.nl