DNSTCPBENCH(1)

✨ DNSTCPBENCH(1) ✨

okay bestie, gather round πŸ’– this is dnstcpbench β€” a lil tool from the PowerDNS Authoritative Server fam that does TCP benchmarking of nameservers. yes we're stress-testing nameservers now, it's giving main character energy πŸ‘‘


🌸 NAME 🌸

dnstcpbench β€” a whole tool to perform TCP benchmarking of nameservers, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

dnstcpbench [OPTION]... REMOTE-ADDRESS [REMOTE-PORT]

✨ DESCRIPTION ✨

so basically dnstcpbench reads DNS queries (by default it's reading them from standard input, bestie) and yeets them out in parallel at a remote nameserver. by default TCP/IP is what's happening, but you can optionally try UDP first, which is lowkey the whole point if you wanna benchmark that TCP/IP fallback situation 🫢

The program reports both mean and median numbers for queries per second and for UDP and TCP latency. okay and this is important: each query only counts once, even if it gets tried over UDP first. which effectively means that passing -u can lower query rates if lots of queries get shunted over to TCP. so like, know that before you start pointing fingers at your numbers 😭

The input format is one query per line: qname single-space qtype. an example, because obviously:

www.powerdns.com ANY

When you're benchmarking extended runs, it may be necessary to enable TIME_WAIT recycling, because otherwise TCP/IP port tuples may simply run out. rude, honestly. On Linux this is performed by running:

echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
ngl the equivalent for IPv6 is not known. we don't have it. it's a mystery. πŸ’€

πŸŽ€ OPTIONS πŸŽ€

  • REMOTE-ADDRESS β€” the IPv4 or IPv6 you wanna test against πŸ‘‘
  • REMOTE-PORT β€” the port you're testing against, defaults to 53.
  • -f <FILENAME>, --file <FILENAME> β€” the FILENAME you read queries from. defaults to standard input if you don't specify anything, slay.
  • -h, --help β€” provides a helpful message 🫢
  • --timeout-msec <MSEC> β€” how many MSEC milliseconds to wait for an answer.
  • -u, --udp-first β€” attempt resolution via UDP first, and only do TCP if a truncated answer is received.
  • -v, --verbose β€” be wordy about what the program is doing. it's a talker πŸ’…
  • --workers <NUM> β€” use NUM parallel worker threads. more workers = more chaos ✨

πŸ’€ BUGS πŸ’€

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 β€” yeah, that's real, that's not a vibe 🌧️

Also, median queries per second statistics are reported as 0 for sub-second runs. so if your run is tiny, don't come crying about your median, it's literally just built that way πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

PowerDNS.COM BV


PowerDNS.COM BV


okay that's the whole page bestie, go forth and benchmark responsibly πŸ§šβ€β™€οΈπŸŒΊ this was dnstcpbench from the PowerDNS Authoritative Server, dated Aug 05, 2026 β€” mwah, bye πŸŽ€πŸ’–

πŸ“¦ where this page comes from