1dnsperf(1)                  General Commands Manual                 dnsperf(1)
2
3
4

NAME

6       dnsperf - test the performance of a DNS server
7

SYNOPSIS

9       dnsperf [-a local_addr] [-b bufsize] [-c clients] [-d datafile] [-D]
10       [-e] [-E code:secret] [-f family] [-h] [-l limit] [-m mode]
11       [-n runs_through_file] [-p port] [-q num_queries] [-Q max_qps]
12       [-s server_addr] [-S stats_interval] [-t timeout] [-T threads] [-u]
13       [-v] [-W] [-x local_port] [-y [alg:]name:secret]
14

DESCRIPTION

16       dnsperf  is a DNS server performance testing tool.  It is primarily in‐
17       tended for measuring the performance of authoritative DNS servers,  but
18       it  can  also  be  used  for  measuring caching server performance in a
19       closed laboratory environment.  For testing caching  servers  resolving
20       against the live Internet, the resperf program is preferred.
21
22       It is recommended that dnsperf and the name server under test be run on
23       separate machines, so that the CPU usage of  dnsperf  itself  does  not
24       slow down the name server.  The two machines should be connected with a
25       fast network, preferably a dedicated Gigabit Ethernet segment.  Testing
26       through a router or firewall is not advisable.
27
28   Configuring the name server
29       If using dnsperf to test an authoritative server, the name server under
30       test should be set up to serve one or more zones similar  in  size  and
31       number to what the server is expected to serve in production.
32
33       Also,  be  sure to turn off recursion in the server's configuration (in
34       BIND 8/9, specify "recursion no;" in the options block).   In  BIND  8,
35       you  should also specify "fetch-glue no;"; otherwise the server may at‐
36       tempt to retrieve glue information from the Internet during  the  test,
37       slowing it down by an unpredictable factor.
38
39   Constructing a query input file
40       A  dnsperf  input  file  should  contain  a  large and realistic set of
41       queries, on the order of ten thousand to a  million.   The  input  file
42       contains one line per query, consisting of a domain name and an RR type
43       name separated by a space.  The class of the query is implicitly IN.
44
45       When measuring the performance serving non-terminal zones such  as  the
46       root zone or TLDs, note that such servers spend most of their time pro‐
47       viding referral responses, not authoritative answers.  Therefore, a re‐
48       alistic input file might consist mostly of queries for type A for names
49       *below*, not at, the delegations present in  the  zone.   For  example,
50       when testing the performance of a server configured to be authoritative
51       for the top-level domain "fi.", which contains delegations for  domains
52       like  "helsinki.fi"  and "turku.fi", the input file could contain lines
53       like
54
55              www.turku.fi A
56              www.helsinki.fi A
57
58       where the "www" prefix ensures that the server will respond with a  re‐
59       ferral.  Ideally, a realistic proportion of queries for nonexistent do‐
60       mains should be mixed in with those for existing ones, and the lines of
61       the input file should be in a random order.
62
63   Constructing a dynamic update input file
64       To  test dynamic update performance, dnsperf is run with the -u option,
65       and the input file is constructed of blocks of lines describing dynamic
66       update messages.  The first line in a block contains the zone name:
67
68              example.com
69
70       Subsequent  lines  contain  prerequisites, if there are any.  Prerequi‐
71       sites can specify that a name may or may not exist, an rrset may or may
72       not exist, or an rrset exists and its rdata matches all specified rdata
73       for that name and type.  The keywords "require" and "prohibit" are fol‐
74       lowed  by  the appropriate information.  All relative names are consid‐
75       ered to be relative to the zone name.  The following lines show  the  5
76       types of prerequisites.
77
78              require a
79              require a A
80              require a A 1.2.3.4
81              prohibit x
82              prohibit x A
83
84       Subsequent  lines  contain  records to be added, records to be deleted,
85       rrsets to be deleted, or names to be deleted.  The  keywords  "add"  or
86       "delete"  are  followed  by  the appropriate information.  All relative
87       names are considered to be relative to the zone  name.   The  following
88       lines show the 4 types of updates.
89
90              add x 3600 A 10.1.2.3
91              delete y A 10.1.2.3
92              delete z A
93              delete w
94
95       Each update message is terminated by a line containing the command:
96
97              send
98
99   Running the tests
100       When  running  dnsperf,  a data file (the -d option) and server (the -s
101       option) will normally be specified.  The output of  dnsperf  is  mostly
102       self-explanatory.   Pay  attention to the number of dropped packets re‐
103       ported - when running the test over a  local  Ethernet  connection,  it
104       should  be zero.  If one or more packets has been dropped, there may be
105       a problem with the network  connection.   In  that  case,  the  results
106       should be considered suspect and the test repeated.
107

OPTIONS

109       -a local_addr
110              Specifies  the  local  address from which to send requests.  The
111              default is the wildcard address.
112
113       -b bufsize
114              Sets the size of the socket's send and receive buffers, in kilo‐
115              bytes.   If  not  specified,  the  operating system's default is
116              used.
117
118       -c clients
119              Act as multiple clients.  Requests are sent from multiple  sock‐
120              ets.  The default is to act as 1 client.
121
122       -d datafile
123              Specifies  the  input data file.  If not specified, dnsperf will
124              read from standard input.
125
126       -D
127              Sets the DO (DNSSEC OK) bit [RFC3225] in all packets sent.  This
128              also enables EDNS0, which is required for DNSSEC.
129
130       -e
131              Enables  EDNS0 [RFC2671], by adding an OPT record to all packets
132              sent.
133
134       -E code:value
135              Add an EDNS [RFC2671] option to  all  packets  sent,  using  the
136              specified numeric option code and value expressed as a a hex-en‐
137              coded string.  This also enables EDNS0.
138
139       -f family
140              Specifies the address family used for sending DNS packets.   The
141              possible  values  are  "inet", "inet6", or "any".  If "any" (the
142              default value) is specified, dnsperf will use whichever  address
143              family is appropriate for the server it is sending packets to.
144
145       -h
146              Print a usage statement and exit.
147
148       -l limit
149              Specifies  a time limit for the run, in seconds.  This may cause
150              the input to be read multiple times, or only some of  the  input
151              to be read.  The default behavior is to read the input once, and
152              have no specific time limit.
153
154       -n runs_through_file
155              Run through the input file at most this many times.  If no  time
156              limit  is  set,  the  file  will  be read exactly this number of
157              times; if a time limit is set, the file may be read fewer times.
158
159       -p port
160              Sets the port on which the DNS packets are sent.  If not  speci‐
161              fied, the standard DNS port (udp/tcp 53, DoT 853) is used.
162
163       -q num_queries
164              Sets the maximum number of outstanding requests.  When this val‐
165              ue is reached, dnsperf will not send any more requests until ei‐
166              ther  responses  are received or requests time out.  The default
167              value is 100.
168
169       -Q max_qps
170              Limits the number of requests per second.  There is  no  default
171              limit.
172
173       -m mode
174              Specifies the transport mode to use, "udp", "tcp" or "dot".  De‐
175              fault is "udp".
176
177       -s server_addr
178              Specifies the name or address of the server  to  which  requests
179              will be sent.  The default is the loopback address, 127.0.0.1.
180
181       -S stats_interval
182              If this parameter is specified, a count of the number of queries
183              per second  during  the  interval  will  be  printed  out  every
184              stats_interval seconds.
185
186       -t timeout
187              Specifies  the  request timeout value, in seconds.  dnsperf will
188              no longer wait for a response to a particular request after this
189              many seconds have elapsed.  The default is 5 seconds.
190
191       -T threads
192              Run  multiple  client  threads.   By  default,  dnsperf uses one
193              thread for sending requests and one  thread  for  receiving  re‐
194              sponses.   If this option is specified, dnsperf will instead use
195              N pairs of send/receive threads.
196
197       -u
198              Instructs dnsperf to send DNS dynamic  update  messages,  rather
199              than queries.  The format of the input file is different in this
200              case; see the "Constructing a dynamic update input file" section
201              for more details.
202
203       -v
204              Enables  verbose  mode.   The DNS RCODE of each response will be
205              reported to standard output when the response  is  received,  as
206              will  the  latency.   If  a query times out, it will be reported
207              with the special string "T" instead of a normal DNS RCODE.  If a
208              query  is  interrupted,  it  will  be  reported with the special
209              string "I".  Additional information regarding network  readiness
210              and congestion will also be reported.
211
212       -W
213              Log  warnings  and errors to standard output instead of standard
214              error making it easier for script, test and automation  to  cap‐
215              ture all output.
216
217       -x local_port
218              Specifies  the  local port from which to send requests.  The de‐
219              fault is the wildcard port (0).
220
221              If acting as multiple clients and the  wildcard  port  is  used,
222              each  client  will  use  a  different random port.  If a port is
223              specified, the clients will use a range of ports  starting  with
224              the specified one.
225
226       -y [alg:]name:secret
227              Add a TSIG record [RFC2845] to all packets sent, using the spec‐
228              ified TSIG key algorithm, name and secret, where  the  algorithm
229              defaults  to  hmac-md5  and the secret is expressed as a base-64
230              encoded string.  Available algorithms are: hmac-md5,  hmac-sha1,
231              hmac-sha224, hmac-sha256, hmac-sha384 and hmac-sha512.
232

SEE ALSO

234       resperf(1)
235

AUTHOR

237       Nominum, Inc.
238
239       Maintained by DNS-OARC
240
241              https://www.dns-oarc.net/
242

BUGS

244       For issues and feature requests please use:
245
246              https://github.com/DNS-OARC/dnsperf/issues
247
248       For question and help please use:
249
250              admin@dns-oarc.net
251
252dnsperf                              2.6.0                          dnsperf(1)
Impressum