Skip to content
redlemonbePublic

About

High-performance DNS benchmark — drop-in dnsperf replacement

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

dnsmark

DNS load testing at line rate, with numbers you can prove.

License: MIT Release GitHub Sponsors

dnsmark pushes a DNS server from a few thousand to millions of queries per second, reads the result straight off the NIC hardware counters, and tells you whether you hit the server's limit or the wire's. One static binary, no setup ritual.

Authorized testing only. Use dnsmark only against DNS servers you own or have explicit written authorization to test.

Why dnsmark

  • 4× dnsperf on the same machine. 8.4 M queries/s over plain kernel UDP, against 2.0 M for dnsperf 2.14: same 16 cores, two Intel X710, same target. How
  • 10 GbE line rate. The optional zero-copy AF_XDP path fills a 10 G link (9.85 M replies/s for ~100-byte replies, about 19 M/s over two links from one process). How
  • Truth read at the wire. Throughput comes from the NIC's own counters, with a verdict: wire-bound or link headroom, so you know which side is the wall.
  • Honest latency. p50 to p999 from real replies only. A query that never came back is counted as lost, never as a latency sample.
  • Finds the real maximum. --ramp brackets the capacity, then bisects to within 5 %: the actual saturation point, not the nearest power of two.
  • Every transport. UDP, TCP, DNS over TLS, DNS over QUIC, EDNS(0), IPv4 and IPv6.
  • Ready for CI. Live dashboard, --json, --csv, side-by-side --compare.

Measured

Four resolvers on the same rig (one 10 GbE Intel X710, 100k-domain corpus, all cache hits), peak over four generators, counted as replies leaving the server's NIC:

Server Peak vs BIND9
Runbound, AF_XDP 12.5 M q/s ~6.6×
Runbound, kernel path 6.8 M q/s ~3.6×
Unbound 1.22 3.1 M q/s ~1.6×
BIND9 1.9 M q/s 1×

Single 20 s runs, ±10-15 % run to run. Method, per-generator figures and caveats: benchmarking guide.

Install

curl -Lo dnsmark https://github.com/redlemonbe/dnsmark/releases/latest/download/dnsmark-x86_64-unknown-linux-musl
chmod +x dnsmark && sudo mv dnsmark /usr/local/bin/

Static (musl) and glibc builds for x86_64 and aarch64 are on the releases page, with SHA256SUMS.txt and a CycloneDX SBOM. Run dnsmark on a different machine from the server under test.

Quick start

dnsmark -s 192.0.2.1                                   # find the max QPS (auto-ramp)
dnsmark -s 192.0.2.1 -Q 5000 -l 60                     # 5,000 q/s for 60 s
dnsmark -s 192.0.2.1 -d queries.txt -l 30              # your own query file
dnsmark -s 192.0.2.1 --compare 192.0.2.2 -l 30         # two servers side by side
dnsmark -s 192.0.2.1 --protocol dot --tls-insecure     # DNS over TLS (lab certificate)
dnsmark -s 192.0.2.1 -l 10 -q --json                   # machine-readable result

Without -d, dnsmark uses its built-in 2,000-domain corpus.

Documentation

Support the project

GitHub Sponsors

Bitcoin 3FP8hkkiu4kwCD1PDFgAv2oq1ZTyXwy3yy · Ethereum 0xB5eEAf89edA4204Aa9305B068b37A93439cBb680

License

MIT, see LICENSE. The in-kernel XDP program (ebpf/dns_xdp_client.c) is GPL-2.0, as the kernel requires. dnsmark is part of RunASM: high-performance infrastructure in Rust, measured at the NIC, not asserted.

About

High-performance DNS benchmark — drop-in dnsperf replacement

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages