dnsplane UDP latency is usually dominated by the resolver process. These kernel/host tweaks can reduce tail latency or loss under burst on small devices (Pi, router, VPS).
- Baseline:
dig @<resolver> example.com +statsmany times; note p50/p95 Query time. - Check drops:
netstat -s | grep -i drop/ss -u -m(UDP memory pressure). - After changes, re-measure the same workload.
- Set governor to
performancewhile benchmarking or if you care about steady low latency:echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
- Revert to
ondemandorschedutilfor power saving when not needed.
Example non-persistent sysctl (tune to your RAM; values are illustrative):
sudo sysctl -w net.core.rmem_max=8388608
sudo sysctl -w net.core.wmem_max=8388608Persist in /etc/sysctl.d/99-dnsplane.conf only after validating. Do not set huge buffers on memory-constrained systems.
Under high concurrency, raise limits for the dnsplane service, e.g. in systemd:
LimitNOFILE=65535- hostNetwork: true (or equivalent) avoids extra NAT/bridge latency for DNS UDP.
- Avoid hard CPU caps that throttle the resolver process.
Usually leave GOMAXPROCS default. Pinning CPUs rarely helps unless you have measured scheduler contention.
POST /stats/perf/reset(or use Tuning → Reset counters in the dashboard) to zero counters.- Run your steady query load (e.g.
digloop ordnsperf) for a few minutes. GET /stats/perf(JSON) or open Tuning in the dashboard: compareavg_prep_ms,avg_total_ms, and histograms; useby_query_typeto see A vs AAAA vs other types.- Repeat with the same workload after sysctl/governor changes so comparisons are fair.
This guide targets Linux. On macOS or Windows, sysctl-style UDP buffer tuning differs or is not exposed the same way; typical small deployments rarely need host-level DNS tuning beyond a stable network path.