Skip to content
Explore the learning library ☟
◎ Google Translate
SanchitGurukulTechnology · Education · Innovation Take a quiz

DNSPerf Tool Explained — DNS Performance Testing, Benchmarking, QPS, Latency and Load Testing

Introduction

Imagine an organization preparing to launch a new online application.

Its DNS infrastructure currently handles normal traffic without problems.

However, the engineering team expects a substantial increase in DNS queries during the launch.

Before the application goes live, the team needs answers to several questions.

  • How many DNS queries can the server process per second?
  • How quickly does it answer under normal load?
  • Does response latency increase when traffic grows?
  • How many queries fail to receive responses?
  • Can the server maintain performance during sustained workloads?
  • Is the DNS server properly sized for future demand?

These questions cannot be answered reliably by running a few individual DNS lookups.

Tools such as dig and nslookup are excellent for examining DNS responses, but a performance benchmark requires controlled query generation and measurement.

This is where DNSPerf becomes useful.

DNSPerf can simulate DNS query workloads, measure response times, identify performance limitations and support infrastructure capacity planning.

What You Will Learn

  • What DNSPerf is
  • DNSPerf command-line tool vs DNSPerf.com
  • How DNS performance testing works
  • Important benchmarking metrics
  • How to install DNSPerf on Linux
  • Creating DNS query workload files
  • Running controlled performance tests
  • Understanding QPS, latency and query loss
  • Common DNSPerf command options
  • DNSPerf vs ResPerf
  • DNS-over-TLS and DNS-over-HTTPS benchmarking
  • DNS performance troubleshooting
  • Security and testing best practices
DNSPerf Architecture Performance Infographic

Prerequisites: DNS Fundamentals, DNS Records, BIND Configuration, dig Command and Basic Linux Administration


1. What Is the DNSPerf Tool?

DNSPerf is a DNS performance testing utility used to measure how DNS servers respond to controlled query workloads.

The open-source command-line program is maintained by DNS Operations, Analysis, and Research Center (DNS-OARC).

It was originally developed through Nominum and Akamai before DNS-OARC assumed maintenance.

Simple Definition

DNSPerf is a DNS benchmarking tool that sends repeated DNS queries to a selected server and measures its response throughput, latency and query completion behavior.

Main Capabilities

  • Generate DNS query traffic.
  • Control the maximum query rate.
  • Test different DNS resource record types.
  • Measure completed queries per second.
  • Measure response latency.
  • Identify lost or unanswered queries.
  • Inspect DNS response codes.
  • Compare different configurations.
  • Support repeatable performance experiments.

Is DNSPerf a DNS Server?

No.

DNSPerf generates test traffic and measures responses.

It does not replace authoritative or recursive DNS server software.

Is DNSPerf the Same as DNSPerf.com?

No.

DNS-OARC dnsperf is a command-line benchmarking application.

DNSPerf.com is a web-based DNS performance comparison service.

The website can help evaluate public DNS providers, while the command-line tool supports controlled testing of designated DNS servers.


2. How Does DNSPerf Work?

DNSPerf reads a workload containing DNS names and record types.

It generates corresponding queries, sends them to a target DNS server and measures the responses.

DNSPerf Testing Process

DNS Performance Testing — Six Stages

Stage 1 — Prepare the Test Server

Select an authorized DNS server and confirm it can answer the intended test queries.

Stage 2 — Create the Workload

Prepare a file containing representative domain names and DNS record types.

Stage 3 — Configure the Test

Specify the destination server, query-rate limit, test duration and concurrency settings.

Stage 4 — Generate Queries

DNSPerf sends DNS requests according to the configured workload and limits.

Stage 5 — Collect Measurements

The tool measures responses, latency, response codes and unanswered queries.

Stage 6 — Analyze Results

Administrators compare the measurements with expected capacity, service requirements and server-resource statistics.

What Makes a Good Workload?

A realistic workload should represent the DNS queries the server normally handles.

For example:

Workload Component Why It Matters
A queries IPv4 address resolution
AAAA queries IPv6 address resolution
MX queries Mail-routing information
NS and SOA queries Authoritative zone information
Nonexistent names Negative DNS response performance
Different name lengths Varying DNS message sizes
DNSSEC-related queries Larger responses and additional processing

For meaningful production-capacity estimates, workloads should also reflect realistic query proportions, zone sizes and traffic patterns.


3. Important DNS Performance Metrics

Several metrics are necessary to evaluate DNS server performance.

Metric Meaning
Queries Sent Total DNS queries transmitted
Queries Completed Queries for which responses were received
Queries Lost Queries without a matched response before timeout or termination
QPS Queries per second
Average Latency Average response time for measured responses
Minimum Latency Fastest recorded response
Maximum Latency Slowest recorded response
Response Codes DNS results such as NOERROR, NXDOMAIN and SERVFAIL

Queries Per Second (QPS)

QPS measures the rate of DNS query processing or completion, depending on the reported metric.

Higher QPS can indicate greater processing capacity, but it must be evaluated alongside latency and loss.

Response Latency

Latency measures how long a query takes to receive a response.

Lower latency is generally desirable, provided the response is correct and the server remains stable.

Lost Queries

A lost query is one for which DNSPerf does not receive a corresponding answer within the applicable conditions.

Query loss may result from:

  • Server overload
  • Packet loss
  • DNS service problems
  • Client-side limitations
  • Network congestion
  • Query timeouts

DNS Error Responses

A DNS response such as NXDOMAIN or SERVFAIL is different from receiving no response.

An NXDOMAIN result may be entirely correct when the requested name does not exist.


4. Installing DNSPerf on Linux

DNSPerf is available through operating-system packages and official DNS-OARC distributions.

Ubuntu or Debian

On systems providing the dnsperf package:

Command
sudo apt update
sudo apt install dnsperf

Package availability and versions depend on the distribution and configured repositories.

Verify Installation

Command
dnsperf -h

This displays the supported command options.

Check Package Version

On Debian or Ubuntu:

Command
dpkg-query -W dnsperf

Official Distribution

DNS-OARC also publishes source releases and distribution packages.

Use the official project release page to obtain the appropriate version for your environment.


5. Practical Lab — Benchmark an Authorized Local DNS Server

This lab uses the local BIND DNS server from the SG BIND 9 Configuration Guide.

Laboratory Requirements

Component Configuration
DNS Server Local BIND 9 authoritative server
Destination IP 127.0.0.1
DNS Zone sg-lab.test
DNSPerf Tool Installed
Query Rate Limit 20 QPS
Test Duration 10 seconds
Maximum Outstanding Queries 10
Intended Environment Dedicated test machine or VM

Step 1 — Verify the DNS Server

Before benchmarking, verify that the local DNS server answers a query.

Command
dig @127.0.0.1 www.sg-lab.test A +norecurse

The BIND configuration guide defines this name in the local test zone.

Step 2 — Create the Workload File

Create a text file:

Command
nano dns-queries.txt

Add:

Command
www.sg-lab.test A
mail.sg-lab.test A
sg-lab.test NS
sg-lab.test SOA
missing.sg-lab.test A

How Does This File Work?

Each line contains:

DNS_NAME RECORD_TYPE

The final query intentionally requests a nonexistent name to test negative response handling.

Step 3 — Run a Controlled Benchmark

Command
dnsperf -s 127.0.0.1
    -d dns-queries.txt
    -Q 20
    -l 10
    -q 10
    -t 2
    -S 5

Understanding the Options

Option Purpose
-s 127.0.0.1 Target DNS server
-d dns-queries.txt Query input file
-Q 20 Maximum offered query rate of 20 QPS
-l 10 Ten-second test limit
-q 10 Maximum ten outstanding queries
-t 2 Two-second query timeout
-S 5 Print periodic statistics every five seconds

Does -Q 20 Guarantee 20 Completed QPS?

No.

-Q limits the offered sending rate.

The achieved rate depends on the DNS server, network, test client and runtime conditions.

Does -q 10 Mean Send Ten Total Queries?

No.

-q limits the number of queries simultaneously awaiting completion.

It is not the total query count.

Does -l 10 Mean Ten Queries?

No.

It sets the time limit in seconds.

With a time-limited run, DNSPerf may cycle through the input workload multiple times.


6. Understanding DNSPerf Results

After a test, DNSPerf reports statistics describing the query workload.

Illustrative Results

The following figures are hypothetical and demonstrate interpretation only. They are not measurements from the laboratory.

Output / Result
Queries sent:        200
Queries completed:   198 (99.00%)
Queries lost:          2 (1.00%)

Response codes:
    NOERROR:          170
    NXDOMAIN:          28

Run time (s):       10.0
Queries per second: 19.8
Average Latency (s): 0.004

How Should These Results Be Interpreted?

Queries Sent — 200

The tool transmitted 200 queries.

Queries Completed — 198

Responses were received for 198 queries.

Queries Lost — 2

Two queries did not receive matched responses under the test conditions.

NXDOMAIN — 28

Twenty-eight answers reported that the requested DNS name did not exist.

These may be valid responses to deliberately nonexistent names in the workload.

QPS — 19.8

The measured completion throughput was approximately 19.8 queries per second.

Average Latency — 0.004 seconds

The average measured response latency was approximately four milliseconds.

What Is Missing from the Average?

Queries receiving no response are not represented as normal completed-query latency measurements.

Therefore, low average latency alongside high query loss can be misleading.

Why Are Response Codes Important?

A DNS server can respond quickly while still producing incorrect or unexpected results.

Latency and throughput measurements must be interpreted alongside response correctness.

DNSPerf Benchmark Results Infographic

7. Important DNSPerf Command Options

DNSPerf supports multiple configuration parameters.

Option Purpose
-s Target DNS server
-d Query data file
-Q Maximum offered queries per second
-l Test duration
-q Maximum outstanding queries
-t Query timeout
-S Periodic statistics interval
-n Number of passes through input file
-c Number of simulated clients/sockets
-T Number of send/receive thread pairs
-m DNS transport mode
-p Destination port
-D Set DNSSEC OK bit
-v Verbose per-query output
-j JSON output, when compiled with support

Example — Run the File a Limited Number of Times

Command
dnsperf -s 127.0.0.1
    -d dns-queries.txt
    -n 3
    -Q 5

This limits the file to three passes and caps the offered query rate at five QPS.

Example — Request DNSSEC-Related Responses

Command
dnsperf -s 127.0.0.1
    -d dns-queries.txt
    -D -Q 5 -l 5

The -D flag requests DNSSEC-related information using the DNSSEC OK bit.

It does not independently perform DNSSEC signature validation.

Example — Enable JSON Output

On compatible builds:

Command
dnsperf -s 127.0.0.1
    -d dns-queries.txt
    -Q 5 -l 5 -j

Does DNSPerf Automatically Produce Graphs?

Not necessarily.

DNSPerf provides performance statistics and supported structured output.

Graphs and dashboards can be created using external analysis tools.

Some builds also support latency histogram output through extended options.


8. DNS-over-TLS, DNS-over-HTTPS and Modern Benchmarking

Modern DNSPerf versions support several DNS transport modes.

Available Transport Modes

Mode Purpose
UDP Traditional DNS over UDP
TCP DNS over TCP
DoT DNS-over-TLS
DoH DNS-over-HTTPS

The -m option selects the supported transport mode.

For example:

-m tcp

or:

-m dot

Why Compare Transports?

Different transports can have different performance characteristics due to:

  • Connection establishment
  • TLS handshakes
  • Connection reuse
  • HTTP processing
  • Packet sizes
  • Network conditions
  • Server implementation

Important DoH Requirement

When testing DoH, DNSPerf requires an appropriate HTTP endpoint configuration, such as the doh-uri extended option.

Why Is Transport Comparison Important?

A DNS server can perform well with ordinary UDP queries but behave differently under TCP, DoT or DoH.

Measure the transport actually used by the intended clients.


9. DNSPerf vs ResPerf vs dig vs nslookup

These tools serve different purposes.

Tool Main Purpose Best Use
DNSPerf Controlled DNS workload benchmarking Authoritative DNS performance testing
ResPerf Increasing-load resolver testing Recursive DNS capacity assessment
dig Detailed DNS query diagnostics Record inspection and delegation troubleshooting
nslookup Basic DNS query diagnostics Quick lookups and interactive troubleshooting

DNSPerf

Useful for measuring throughput and latency under controlled DNS query workloads.

ResPerf

Designed to study how caching DNS services respond as query rates increase.

dig

Useful for analyzing individual DNS answers, flags, TTL values, DNSSEC records and authoritative responses.

nslookup

Useful for straightforward name-resolution checks across common operating systems.

Why Use These Tools Together?

A practical DNS troubleshooting process may use:

  1. dig to verify the expected DNS record.
  2. nslookup to confirm a client-side resolution problem.
  3. DNSPerf to assess controlled authoritative DNS performance.
  4. ResPerf to investigate recursive DNS capacity.

10. DNS Benchmarking Best Practices

A meaningful benchmark requires controlled conditions.

Recommended Practices

  1. Obtain authorization: Test only designated DNS infrastructure.
  2. Use a staging environment: Avoid unnecessary production impact.
  3. Verify DNS correctness: Confirm expected answers before benchmarking.
  4. Use representative workloads: Include actual record types and typical query patterns.
  5. Start with a low rate: Increase only within an approved test plan.
  6. Measure the client: Ensure the DNSPerf machine is not the bottleneck.
  7. Monitor the server: Track CPU, memory, network usage and service errors.
  8. Repeat tests: Compare results across consistent runs.
  9. Record configurations: Document software versions, workloads, network conditions and options.
  10. Compare equivalent conditions: Use the same workload when evaluating different configurations.

Common Mistakes

Mistake Why It Matters
Testing an unauthorized public resolver Can disrupt third-party services
Using only repeated identical names May create unrealistic caching behavior
Ignoring NXDOMAIN and SERVFAIL Hides differences in response correctness
Looking only at average latency Can hide lost queries
Treating -Q as achieved throughput Confuses offered load with measured results
Ignoring the test client’s CPU May misidentify the bottleneck
Comparing different workloads Produces unreliable performance comparisons
Using a tiny lab zone to predict production capacity Does not represent realistic zone size or query diversity

What About a 100,000-Query Test?

A larger test may be appropriate in a controlled capacity-planning environment.

However, query count and requested sending rate alone do not prove what a DNS server can sustain.

A credible capacity assessment should measure actual completed throughput, latency, loss and resource utilization at each approved workload level.

DNSPerf Capacity Benchmarking Infographic

11. Advantages and Limitations of DNSPerf

Advantages

Performance Measurement

Provides quantitative throughput and latency information.

Controlled Workloads

Allows administrators to use specified query files and rate limits.

Capacity Planning

Helps identify performance limitations under designated workloads.

DNS Response Analysis

Reports completed queries, losses and response codes.

Repeatable Tests

Supports consistent benchmarking when test conditions are documented.

Modern Transport Support

Supports different DNS transport modes on suitable builds.

Limitations

Can Consume Significant Resources

Benchmarking can place substantial load on servers and networks.

Requires Correct Workload Design

Unrepresentative queries can lead to misleading conclusions.

Not a Complete Security Audit

It does not replace DNSSEC validation, vulnerability assessment or configuration review.

Does Not Automatically Diagnose Every Bottleneck

Server and network monitoring are still necessary.

Average Latency Can Be Misleading

Unanswered queries require separate consideration.

Production Testing Risks

Uncontrolled benchmarking can affect service reliability.


12. Frequently Asked Questions

Q1. What is DNSPerf?

DNSPerf is a DNS performance testing utility that generates queries and measures response behavior.

Q2. Who maintains the open-source DNSPerf tool?

DNS-OARC maintains the project.

Q3. What is the latest verified release as of November 2026?

DNSPerf 2.16.0, published August 5, 2026.

Q4. What does QPS mean?

Queries per second.

Q5. Is -Q the number of queries completed?

No. -Q limits the offered query rate.

Q6. Can DNSPerf test recursive DNS servers?

Yes, in controlled environments. ResPerf is better suited to some recursive resolver load-testing scenarios.

Q7. Is DNSPerf.com the same as the DNSPerf command-line tool?

No. DNSPerf.com provides public DNS performance comparisons; DNS-OARC dnsperf is a command-line benchmarking program.

Q8. Does DNSPerf prove DNS is secure?

No. It measures performance and response behavior, not the complete security of DNS infrastructure.


13. Key Takeaways

  • DNSPerf is used for DNS performance testing.
  • DNS-OARC maintains the open-source command-line tool.
  • Version 2.16.0 is the latest release verified for November 2026.
  • DNSPerf.com is a separate web-based benchmarking service.
  • DNSPerf generates workloads from DNS query input files.
  • QPS measures DNS query processing rate.
  • -Q limits offered queries per second.
  • -q limits outstanding queries.
  • -l sets test duration.
  • -t sets query timeout.
  • DNS response codes are different from lost queries.
  • Expected NXDOMAIN responses are not automatically test failures.
  • Average latency should be interpreted alongside query loss.
  • Modern builds support UDP, TCP, DoT and DoH testing.
  • ResPerf complements DNSPerf for recursive resolver capacity testing.
  • Benchmarking must be authorized, controlled and repeatable.

SG Quick Revision — DNSPerf Tool

DNSPerf: DNS performance benchmarking utility.

DNS-OARC: DNS Operations, Analysis, and Research Center.

QPS: Queries Per Second.

Latency: Time between a DNS query and its response.

Query Loss: Query without a matched response under the test conditions.

NOERROR: DNS response without an error code.

NXDOMAIN: Requested DNS name does not exist.

SERVFAIL: DNS server could not complete the request.

-s: Target DNS server.

-d: Query data file.

-Q: Maximum offered query rate.

-q: Maximum outstanding queries.

-l: Test duration.

-t: Query timeout.

-S: Statistics interval.

-n: Input file passes.

-c: Simulated clients.

-T: Thread pairs.

-m: DNS transport mode.

-D: DNSSEC OK flag.

-j: JSON output when supported.

ResPerf: Companion DNS resolver performance testing utility.

dig: Detailed DNS query diagnostic utility.

nslookup: Basic DNS lookup utility.

Main Concept: Controlled DNS Workload + Authorized Test Server + Measured QPS + Latency + Query Loss + Response Accuracy = Meaningful DNS Performance Benchmarking.


Conclusion

DNSPerf is a useful tool for evaluating DNS server performance, responsiveness and capacity under controlled conditions.

It allows administrators to generate representative workloads, measure completed queries, examine latency and identify unanswered DNS requests.

These measurements support capacity planning, configuration comparisons and performance troubleshooting.

However, benchmarking must be performed carefully.

A high QPS value does not automatically indicate reliable DNS service.

Administrators must also evaluate query loss, response codes, latency variation and system-resource usage.

Modern DNSPerf versions provide additional capabilities for structured reporting and DNS transport testing.

The companion ResPerf tool supports scenarios involving increasing resolver workloads.

When combined with DNS administration tools such as BIND, dig and nslookup, DNSPerf helps organizations move beyond basic DNS functionality checks toward measurable performance assessment.

Reliable DNS benchmarking requires representative workloads, controlled testing, accurate measurements and responsible analysis.

Recommended Further Reading

  • What Is DNS? Domain Name System Explained
  • What Is BIND DNS Server? Architecture, Features and Security
  • BIND 9 Configuration Guide
  • What Is an Authoritative DNS Server?
  • What Is a Recursive DNS Server?
  • dig Command Explained
  • nslookup Command Explained
  • DNS Records Explained — Parts 1 and 2

SanchitGurukul Resources

Official DNSPerf Documentation

Related DNS Standards

Your feedback matters

Was this post helpful?

0 reactions

SanchitGurukul — Technology • Education • Innovation

Discussion

0 approved comments

No approved comments yet. You can start the discussion below.

Leave a Comment

No login is required. Name and email are used for moderation/security. Your email is never displayed publicly. All comments require administrator approval.

This field is not used to determine whether a comment is safe.

Plain text only. File uploads, scripts, executable code, abuse and spam are not accepted.


Discover more from SanchitGurukul

Subscribe to get the latest posts sent to your email.

Keep exploring

Related guides

Namaste! I’m SG Saarthi 👋Need help learning or finding something?