A DNS load testing tool that fires concurrent queries at a DNS server and reports performance stats. Built to stress-test Pi-hole, dnscrypt-proxy, or any DNS resolver.
Single-file .NET 10 app — no dependencies, no project file.
dotnet run dnsperftest.cs -- --server <ip-or-hostname> [options]
| Flag | Short | Default | Description |
|---|---|---|---|
--server |
-s |
required | DNS server IP or hostname |
--requests |
-n |
1000 | Total number of queries to send |
--concurrency |
-c |
50 | Max concurrent queries in flight |
--timeout |
-t |
2000 | Per-query timeout in milliseconds |
--random |
-r |
off | Prepend random subdomain to bypass DNS cache |
# Test your Pi-hole with defaults (1000 requests, 50 concurrent)
dotnet run dnsperftest.cs -- -s pi.hole
# Stress test with high concurrency
dotnet run dnsperftest.cs -- -s 192.168.1.10 -n 5000 -c 200
# Test uncached performance (bypasses DNS cache)
dotnet run dnsperftest.cs -- -s pi.hole -n 1000 -c 50 --random
# Test against Google DNS
dotnet run dnsperftest.cs -- -s 8.8.8.8 -n 500 -c 20DNS Performance Test
Server: pi.hole
Requests: 1000
Concurrency: 50
Timeout: 2000ms
Results:
Successful: 1000
Failed: 0 (0.0%)
Total time: 0.13s
Req/sec: 7598.7
Latency (ms):
Min: 0.7
Avg: 5.5
P50: 4.7
P95: 9.9
P99: 13.3
Max: 13.9
- Sends raw UDP DNS A-record queries directly to the target server (bypasses OS resolver cache)
- Uses
SemaphoreSlimto cap concurrency - Rotates through 20 built-in popular domains
- With
--random, prepends a unique GUID subdomain to each query to force cache misses - NXDOMAIN responses count as successful (the server did its job)