Skip to main content

Performance and Benchmarks

This page collects the performance notes moved out of the README and keeps public benchmark snapshots by version. The goal is not to claim an absolute winner, but to show the performance profile of ForgeDNS under different levels of policy complexity, concurrency, and transport-path pressure.

What ForgeDNS Cares About

ForgeDNS is not only interested in peak numbers for the simplest possible case. The more relevant questions are:

  • Is the hot path still controlled when cache, rules, fallback, and rewrites are enabled?
  • Is overall latency acceptable when several upstreams race concurrently?
  • Can the structure still be optimized after adding more protocols and plugins?
  • Do system integrations and observability stay off the critical response path enough to avoid dragging performance down?

Metric Notes

  • Higher QPS is better
  • Lower average latency and latency stddev are better
  • run_dnsperf_compare.sh is better for saturated or higher-concurrency throughput and queueing behavior
  • run_dnsperf_latency_compare.sh is better for low-concurrency latency, with clients == outstanding
  • These snapshots are better read as version-specific distributions of strengths against mosdns
  • Because the 2026-04-13 compare pack updated the scenario catalog, query sets, and some workload definitions, the absolute numbers in v0.1.0 and v0.3.0 should not be treated as a direct regression chart across versions

Legend:

  • Green means ForgeDNS performs better on that metric
  • Red means mosdns performs better on that metric
  • Neutral means the gap is small and shown only as a reading aid, not as a claim of statistical significance

v0.3.0

Higher-Concurrency Throughput and Average Latency

Test environment:

  • Date: 2026-04-13
  • System: Linux 6.8.12-2-pve x86_64
  • Selector: core
  • Compared versions: ForgeDNS v0.3.0, mosdns v5.3.4-0-gb732318

Load-test parameters:

  • Tool: dnsperf
  • warmup_seconds=2
  • bench_seconds=8
  • bench_repeats=3
  • dnsperf_clients=32
  • dnsperf_threads=4
  • dnsperf_outstanding=1024
  • dnsperf_max_qps=unlimited

How to read these results:

  • Scenarios such as baseline UDP forward, concurrent upstreams, and dual-entry UDP/TCP include upstream forwarding or upstream races, so they mainly reflect end-to-end proxy behavior; upstream RTT, upstream response stability, and race strategy matter more here than small local processing differences
  • cache hotpath, local answers, and server local UDP/TCP are closer to local processing cost
  • domain set and composite provider chain are better indicators for rule-heavy and dataset-heavy policy workloads

The table below shows the per-scenario medians aggregated from repeats:

ScenarioForgeDNS QPSmosdns QPSQPS DeltaForgeDNS Avg Latencymosdns Avg Latency
baseline UDP forward35,498.136,883.2-3.8%7.735 ms11.244 ms
cache hotpath139,133.9134,881.6+3.1%0.637 ms0.721 ms
dual-entry UDP35,800.935,382.3+1.2%7.092 ms10.170 ms
dual-entry TCP37,295.137,221.2+0.2%24.646 ms25.083 ms
concurrent upstreams21,038.713,319.4+58.0%10.404 ms20.601 ms
local answers126,268.4149,119.6-15.3%0.783 ms0.639 ms
domain set165,647.736,383.7+355.3%0.549 ms4.078 ms
ip set133,355.1150,756.7-11.5%0.740 ms0.637 ms
composite provider chain158,693.625,972.4+511.0%0.532 ms6.251 ms

Low-Concurrency Latency Sweep

Test environment:

  • Date: 2026-04-13
  • System: Linux 6.8.12-2-pve x86_64
  • Selector: latency-core
  • Compared versions: ForgeDNS v0.3.0, mosdns v5.3.4-0-gb732318

Load-test parameters:

  • Tool: dnsperf
  • warmup_seconds=1
  • bench_seconds=5
  • bench_repeats=3
  • latency_client_levels=1 2 4
  • dnsperf_threads=1
  • dnsperf_timeout=5
  • dnsperf_outstanding=matches_client_count

The three tables below focus on average latency and jitter first, while QPS remains a secondary sanity metric. They use the same color rule as above: lower latency or jitter is green, higher latency or jitter is red, and ties are neutral.

clients=1, outstanding=1

ScenarioForgeDNS Avg Latencymosdns Avg LatencyLatency DeltaForgeDNS Jittermosdns JitterJitter Delta
baseline UDP forward6.716 ms5.708 ms+17.66%0.170 ms1.140 ms-85.09%
cache hotpath0.029 ms0.031 ms-6.45%0.017 ms0.021 ms-19.05%
dual-entry UDP5.949 ms6.394 ms-6.96%0.426 ms2.364 ms-81.98%
dual-entry TCP5.984 ms6.118 ms-2.19%0.380 ms0.829 ms-54.16%
local answers0.026 ms0.029 ms-10.34%0.016 ms0.019 ms-15.79%
domain set0.025 ms0.108 ms-76.85%0.011 ms0.095 ms-88.42%
composite provider chain0.025 ms0.156 ms-83.97%0.012 ms0.129 ms-90.70%
server local UDP0.025 ms0.027 ms-7.41%0.013 ms0.013 ms+0.00%
server local TCP0.027 ms0.030 ms-10.00%0.009 ms0.018 ms-50.00%

clients=2, outstanding=2

ScenarioForgeDNS Avg Latencymosdns Avg LatencyLatency DeltaForgeDNS Jittermosdns JitterJitter Delta
baseline UDP forward6.001 ms7.382 ms-18.71%0.262 ms0.858 ms-69.46%
cache hotpath0.033 ms0.037 ms-10.81%0.050 ms0.053 ms-5.66%
dual-entry UDP6.408 ms5.923 ms+8.19%1.247 ms0.488 ms+155.53%
dual-entry TCP5.651 ms5.633 ms+0.32%0.417 ms0.518 ms-19.50%
local answers0.040 ms0.031 ms+29.03%0.021 ms0.018 ms+16.67%
domain set0.029 ms0.111 ms-73.87%0.013 ms0.104 ms-87.50%
composite provider chain0.029 ms0.165 ms-82.42%0.014 ms0.141 ms-90.07%
server local UDP0.030 ms0.029 ms+3.45%0.016 ms0.016 ms+0.00%
server local TCP0.028 ms0.030 ms-6.67%0.014 ms0.015 ms-6.67%

clients=4, outstanding=4

ScenarioForgeDNS Avg Latencymosdns Avg LatencyLatency DeltaForgeDNS Jittermosdns JitterJitter Delta
baseline UDP forward5.977 ms5.910 ms+1.13%0.355 ms2.700 ms-86.85%
cache hotpath0.044 ms0.060 ms-26.67%0.028 ms0.063 ms-55.56%
dual-entry UDP6.637 ms5.426 ms+22.32%25.556 ms0.435 ms+5774.94%
dual-entry TCP6.451 ms6.941 ms-7.06%4.422 ms26.437 ms-83.27%
local answers0.056 ms0.040 ms+40.00%0.030 ms0.025 ms+20.00%
domain set0.034 ms0.155 ms-78.06%0.016 ms0.141 ms-88.65%
composite provider chain0.034 ms0.221 ms-84.62%0.015 ms0.172 ms-91.28%
server local UDP0.042 ms0.038 ms+10.53%0.024 ms0.024 ms+0.00%
server local TCP0.042 ms0.039 ms+7.69%0.026 ms0.022 ms+18.18%

v0.3.0 Result Readout

  • If your real deployment relies on complex rule sets, large datasets, or multi-upstream racing, ForgeDNS is in a stronger position in v0.3.0; domain set, composite provider chain, and concurrent upstreams are all clearly ahead.
  • cache hotpath now shows a small lead for ForgeDNS, which means the gap on high-frequency cache-hit traffic has narrowed substantially.
  • In local-answer workloads, the gap between ForgeDNS and mosdns is already fairly small; the ip set result is also more constrained by the local-answer performance ceiling than by a completely separate bottleneck.
  • For forward, dual-entry, and concurrent upstreams, the numbers should be read as end-to-end proxy behavior. Upstream latency and upstream response stability are the dominant factors there, not just local implementation overhead.
  • In the low-concurrency latency sweep, domain set, composite provider chain, cache hotpath, and server local TCP are the most stable strong areas; dual-entry UDP shows noticeably higher jitter at clients=4, so that scenario still needs more stability work.

v0.1.0

The following public result set is preserved as the historical v0.1.0 snapshot from March 26, 2026.

Higher-Concurrency Throughput and Average Latency

Test environment:

  • CPU: Intel N100, 4 cores
  • Memory: 1 GB
  • Environment: LXC inside a PVE VM
  • System: Linux 6.8.12-2-pve x86_64
  • Date: 2026-03-26
  • Compared versions: forgedns v0.1.0, mosdns v5.3.4-0-gb732318

Load-test parameters:

  • Tool: dnsperf
  • warmup_seconds=2
  • bench_seconds=8
  • bench_repeats=3
  • dnsperf_clients=32
  • dnsperf_threads=4
  • dnsperf_outstanding=1024
  • dnsperf_max_qps=unlimited

The table below shows the average of three runs for each scenario:

ScenarioForgeDNS QPSmosdns QPSQPS DeltaForgeDNS Avg Latencymosdns Avg Latency
baseline UDP forward37,789.637,269.2+1.4%9.142 ms12.312 ms
cache hotpath131,982.3133,380.3-1.0%1.235 ms0.696 ms
dual-entry UDP39,614.434,356.8+15.3%8.946 ms10.009 ms
dual-entry TCP36,257.935,975.4+0.8%25.403 ms25.577 ms
concurrent upstreams21,694.813,195.4+64.4%15.065 ms23.790 ms
fallback standby22,259.923,223.9-4.2%16.376 ms10.616 ms
local answers132,286.6146,754.3-9.9%1.250 ms0.636 ms
DoH upstream (HTTP/2)29,781.625,835.7+15.3%13.363 ms11.445 ms
domain set172,061.735,966.1+378.4%0.901 ms4.210 ms
ip set134,257.4150,923.0-11.0%1.227 ms0.625 ms
sequence base131,995.6150,301.5-12.2%1.265 ms0.622 ms
match true135,326.0153,289.5-11.7%1.217 ms0.629 ms
match false136,740.1152,297.5-10.2%1.201 ms0.630 ms
match qname132,289.4152,203.6-13.1%1.248 ms0.638 ms

v0.1.0 Historical Readout

  • ForgeDNS was stronger in concurrent upstream races, DoH upstreams, dual-entry UDP, and large domain_set scenarios
  • mosdns was still faster in cache-hit paths, local answers, basic sequence, and lighter matcher scenarios
  • fallback standby still showed room for further optimization

Raw Materials