Measure how fast it answers
Run a load against your own server and write the numbers down. Two machines, one
switch, and about ten minutes. Everything the run needs is in bench/ in the
source tree.
A number from this tells you whether your hardware keeps up with your network. It does not tell you whether this server is faster than another one, because that needs both on the same machine and the same load.
What is measured
Section titled “What is measured”Three loads, and each one answers a different question.
| Load | Asks for | Tells you |
|---|---|---|
hot |
1,000 names, every answer from the cache | The fastest this server ever goes |
mixed |
100,000 names, 95 in 100 from the cache | The rate a real network sees |
blocked |
10,000 names from a real blocklist | What the blocking test costs |
Two of them are targets this project holds itself to, and both are written so they can be false.
The cached target is 100,000 queries a second, every answer from the cache, over UDP, on 8 cores, with 512 byte answers. It is measured from a second machine on the same 1 gigabit switch, over 60 seconds after a 30 second warm-up, with no lost queries.
The mixed target is whatever rate your server sustains at a 95 in 100 cache hit ratio. It is recorded rather than promised. The 5 in 100 that miss go to another resolver, so that number belongs as much to it as to this server.
Every part of the first one changes the answer, which is why every part is in it. A cached answer is a read from memory and an answer from another resolver is a network round trip. A stream transport pays for a connection. The UDP path runs one worker per core, so the rate follows the core count. Bigger answers move more bytes, and then your network is the limit rather than your processor. A run on the same machine as the server skips the network driver, which flatters the result.
What you need
Section titled “What you need”- Two machines on one switch. One runs the server, the other sends the queries.
dnsperfon the machine that sends. On Debian,apt install dnsperf. On macOS,brew install dnsperf.digandpython3on both.- A release build:
cargo build --release. A debug build makes this server look 20 times slower.
The run builds its own configuration and its own zone, under a scratch directory. It does not touch the server you already have running, and it writes nothing where that server reads.
Run it
Section titled “Run it”On the machine that serves, where 192.168.1.2 is its own address and
192.168.1.3 is the other machine:
cd /path/to/tadorucargo build --release./bench/run.sh serve --listen 192.168.1.2:5300 --generator 192.168.1.3It writes the query files, starts two servers, and waits. The second one holds the zone with the answers in it. It prints one line to copy into your results, which is the processor and the core count of that machine. Ctrl-C stops both.
On the machine that sends:
cd /path/to/tadoru./bench/run.sh load --server 192.168.1.2:5300 --generator 192.168.1.3Pass the same --generator to both sides. The serving side puts that address in
a client entry and in rate_bypass, and the sending side sends from it. The
generator is one address that sends far more queries than any client limit
allows. Without the exemption, the rate limits drop the run.
It runs three loads in turn: hot, mixed and blocked. A fourth, cold, asks only for names that
always miss, so every answer goes to the upstream. Add it with --loads "hot mixed blocked cold".
Each load fills the cache, warms up for
30 seconds, measures for 60, and prints a block of numbers. The whole thing
takes about five minutes.
To try it on one machine, which is not the target:
./bench/run.sh load --localEvery block from that says so in its own first line.
Read the answer
Section titled “Read the answer”Each block holds these, and each one is there because a rate on its own hides something.
| Number | What it tells you |
|---|---|
| Queries per second | The headline |
| Queries completed | How many of the ones sent came back |
| Queries lost | How many did not. A run that loses queries is not a fast run |
| Latency average, with its range | The typical wait, and the slowest one |
| Latency standard deviation | How much the wait varies |
| Response codes seen | A server answering SERVFAIL quickly is not answering |
| Average packet size | Holds the run to the 512 byte answer the target names |
| Memory at the end | A rate bought with a gigabyte of memory is a different trade |
| Cache entries at the end | What the ratio below is over |
| Cache hit ratio the server reports | The server’s own view, to compare with what you asked for |
There is no 50th or 99th percentile in that list, because dnsperf does not
report one. It gives an average with the fastest and slowest, and how much the
wait varied.
When a run is wrong
Section titled “When a run is wrong”Four things make a number meaningless, and three of them the run tells you about.
Lost queries. The run prints the count. Anything above zero means the server or the network dropped packets. Then the rate is of a server that stopped answering, not one answering fast.
A mixed hit ratio near 100 in 100. The mixed load is built to miss 5 times in 100. If it reports almost everything as a hit, the miss names were answered from the cache and the run measured the cached load twice.
A response code that is not NOERROR. A server answering SERVFAIL does it quickly.
And a run of ten seconds, or one on the same machine, or one without
--release. None of those is the target, and the last one is the mistake that
makes this server look 20 times slower than it is.
What the blocking test costs
Section titled “What the blocking test costs”Two runs of the same load, one with the lists and one without. The difference is what the test costs per query.
./bench/run.sh serve --listen 192.168.1.2:5300 --generator 192.168.1.3./bench/run.sh serve --listen 192.168.1.2:5300 --generator 192.168.1.3 --no-blockingBy default the run reads sample lists from the source tree, and those samples hold about a thousand rules each. A real list holds two hundred thousand, and the size changes the answer. For a number you keep, point it at full lists:
./bench/run.sh serve --lists /path/to/lists --generator 192.168.1.3That directory needs hagezi-pro.txt, oisd-domainswild2.txt and
adguard-dns.txt.
A group costs something too, and the same two runs answer it. --group one puts
the sending machine in a group with one list, and --group five puts it in a
group with all of them.
See where the time goes
Section titled “See where the time goes”A profile of an idle server shows an idle server, so this drives the load itself:
./bench/run.sh serve &./bench/profile.sh --server 127.0.0.1:5300 --duration 60It needs flamegraph, which is cargo install flamegraph. On Linux it also
needs perf and kernel.perf_event_paranoid below 2. On macOS the tool
underneath is dtrace and it needs root. It gives a different picture of the same
code, so write down which machine it came from.
The output is one image. Nothing from it belongs in your results except a sentence about what it showed.
Results
Section titled “Results”The first run landed on --local, so it is not the target: one machine ran both
sides, and the two competed for cores instead of one driving the other over a
switch.
| Date | Version | Machine | Load | Queries a second | Latency average | Lost | Memory |
|---|---|---|---|---|---|---|---|
| 2026-09-26 | d92110c |
Apple M1 Pro, 10 cores, loopback | hot | 49994.67 | 0.010218 s | 0 | 39 MB |
| 2026-09-26 | d92110c |
Apple M1 Pro, 10 cores, loopback | mixed | 53959.20 | 0.009461 s | 0 | 42 MB |
| 2026-09-26 | d92110c |
Apple M1 Pro, 10 cores, loopback | blocked | 54541.42 | 0.009364 s | 0 | 43 MB |
| 2026-09-26 | 08723da |
Proxmox VM, 8 cores, internal net | hot | 119405.03 | 0.000477 s | 0 | not read |
| 2026-09-26 | 08723da |
Proxmox VM, 8 cores, internal net | mixed | 119290.74 | 0.000518 s | 0 | not read |
| 2026-09-26 | 08723da |
Proxmox VM, 8 cores, internal net | blocked | 119497.78 | 0.000468 s | 0 | not read |
| 2026-09-26 | 08723da |
Proxmox VM, 8 cores, wired switch | hot | 119976.28 | 0.000833 s | 844 | not read |
| 2026-09-26 | 08723da |
Proxmox VM, 8 cores, wired switch | mixed | 119986.75 | 0.000824 s | 792 | not read |
| 2026-09-26 | 08723da |
Proxmox VM, 8 cores, wired switch | blocked | 115350.28 | 0.000754 s | 3142 | not read |
Add one row a load, with the headline number from the block the run prints. Keep the full block you printed on your own machine, because the row alone does not carry it. The machine matters as much as the rate: the processor, the core count, whether the clock was locked to one speed, what the other machine was, and whether both were on one switch. A rate with no machine beside it is a rate nobody can repeat.
When a run refuses
Section titled “When a run refuses”h00000.bench.example answered REFUSED. The sending machine is not in
allow_recursion, so the server refuses every query in the run. Add that
address or its network to allow_recursion in the node file the run made, under
the scratch directory it printed, and start it again.
the hit ratio was not read. The sending machine cannot reach the server’s
metrics endpoint. That endpoint listens on loopback by default, so a run from a
second machine needs metrics_listen set to an address that machine reaches.
Everything else in the block is still good.
dnsperf is not installed. Install it on the machine that sends, not the one
that serves.
the prefill lost queries. The server did not answer every name before the
measurement started, so the cache does not hold what the run needs. Its log is
in the scratch directory, and the usual cause is a server still reading its
blocklists.