Measuring the resource requirements of DNSSEC |
 |
Olaf Kolkman
RIPE NCC / NLnet Labs
Document ID: ripe-352
Date: 29 September 2005
Executive Summary:
We measured the effects of deploying DNSSEC on CPU, memory
and bandwidth consumption of authoritative name servers. We
did this by replaying query traces captured from ns-pri.ripe.net
and k.root-servers.net in a controlled lab environment.
We concluded that deploying DNSSEC on k.root-servers.net
can easily be done with the currently deployed systems. In
fact using the implementation today, the total increase in
memory footprint is less than 5%. CPU usage would grow from
4 to 5% and the increase in bandwidth usage is around 10%.
Deployment of DNSSEC with all zones on ns-pri.ripe.net
would cause a significantly higher consumption of memory and
bandwidth usage while CPU would increase slightly. But growth
is also well within the boundaries set by specifications of
the currently deployed systems. The difference in bandwidth
consumption between the k.root-server.net and ns-pri.ripe.net
experiment was mainly due to the difference in the fraction
of packets that requested DNSSEC information.
For k.root-servers.net, we also examined what the
upper level of bandwidth consumption would be (i.e.
what would happen if each request caused DNSSEC processing).
The amount of bandwidth needed to answer the queries increased
by 2 or 3 times, depending on some implementation properties.
This growth is also within boundaries of currently deployed
systems.
We recommend an implementation choice to minimise bandwidth
consumption.
Increase of DNSSEC key sizes does not increase the amount
of answers with the truncation (TC) bit set.
Introduction
DNSSEC [rfc4033,rfc4034,rfc4035] provides authentication
and integrity checking to the domain name system. DNS Resource
Records (RR) are signed using private keys. The signatures are
published in the DNS as RRSIG resource records. The public keys
that are needed to validate the signatures are published as
DNSKEY resource records.
In addition to the DNSKEY and RRSIG RRs, DNSSEC introduces
the NSEC RR that is used to prove the non-existence of data,
and the DS RR that is used to delegate signing authority from
one zone to another.
The introduction of these records causes zones to grow significantly.
It is expected that this growth would have an effect on disks,
memory and bandwidth usage. Besides DNSSEC aware servers have
to do special processing to include the appropriate DNSSEC data.
This might increase CPU load.
In this paper, we have set out to address the following question:
What would be the immediate and initial effect on memory,
CPU and bandwidth resources if we were to deploy DNSSEC on k.root-servers.net
and ns-pri.ripe.net?
We performed a number of experiments in a test lab. Focusing
on the immediate effects we used packet traces captured from
the ns-pri.ripe.net and k.root-servers.net
production servers. These traces were replayed --mimicking real-time
behaviour-- in the lab. The name server answering the queries
carried zones that were signed with various sized keys. We measured
memory consumption, packet counts and performed bandwidth measurements.
These metrics in addition to some observations about the data
contained in the traces provided enough information for provisioning
the server infrastructure for DNSSEC.
In section 2 we describe
the lab environment. In section 3
we perform an analysis of the query traces that were used in
the experiment. The EDNS0 properties[rfc2671] of these traces is an important
factor in the final bandwidth usage.
In section 4 we describe the
impact of loading signed zones on the memory usage of the name
servers and provide the parameters that can be used to estimate
memory increase when loading signed zones.
In section 5 we assess the impact
on CPU load when serving secured zones. Section 6
focuses on the bandwidth and the packet statistics for the various
measurement configurations.
In section 7 we discuss
the results and provide recommendations.
Appendix B provides
a somewhat academic taxonomy of the replies for some of the
experiments. We look at size distribution and discuss some of
the phenomena that can be observed in these size distributions.
This section contains the count of replies with the TC bit.
The paper by [ADF05] contains a similar analysis.
Their experiments were more extended. They involved a caching
forwarding name server. Their analysis used traces for which
all the queries had been modified to include the EDNS0 OPT RR
with the DO bit set. They measured the 'per packet' overhead.
In this paper we will divert into a similar measurement -- not
through the modifications of the query but through the modification
of the name servers. We also measure bandwidth increase instead
of per packet increase.
We assume the reader is familiar with DNS and DNSSEC jargon.
The figures and graphs are clearest when viewed in colour.
The Test Setup
The DISTEL Lab
The tests are performed on the Domain Name Server testing
lab "DISTEL" test lab [KYLK02]. This lab was designed
and implemented by the RIPE NCC to perform regression tests
during the development of NSD. It is currently maintained by
NLnet Labs.
The lab (Figure 1) consists of
three identical machines containing AMD Athlon(TM) XP 2000+
(1670.46-MHz 686-class) CPUs. Two machines, labelled player
and recorder contain 256 MB of memory. One machine,
labelled server, contains 1.5GB of memory and acts
as DNS name server. All machines run FreeBSD 6.0-CURRENT (13
June 2005).
The machines are connected through a 100baseT full duplex
Ethernet network. The interfaces on that network are configured
with RFC1918 addresses. The experiment is controlled through
the player.
Figure 1: The DISTEL Test Lab
|
The DNS server has a host route configured for the
player and has its default route configured to recorder.
recorder has host routes for the other two machines
and a default route to /dev/null.
Experiments are performed by taking libpcap traces
from the production machines. After modifying the destination
IP and MAC addresses to be those of the server the
traces were replayed using a modified version of tcpreplay.
The modifications to tcpreplay were done to avoid packet
burst caused by problems with usleep having limited
resolution and sometimes skipping a beat. See [KYLK02] for details.
Because of the default route configured on server
the answers end up at recorder on which a tcpdump
is collecting the answers before they end up at /dev/null.
In this setup, we can only study the effects of UDP traffic.
The server used in the experiment has slightly lower hardware
specifications, and runs a different operating system from the
ns-pri.ripe.net and k.root-servers.net production
systems.
For these experiments, the DNS sever ran BIND 9.3.1[BIND] and NSD 2.3.0 [NSD]. BIND was compiled with open-ssl
and without multi threading FN, NSD 2.3.0
was compiled with the default options.
As well as the stock version of these name servers we used
modified versions of both of the servers for a subset of the
experiments. The modifications were designed to make the servers
behave as if every query that had an EDNS0 option without the
DO bit set actually had the DO bit set. It also acted as if
every query without EDNS0 options actually contained an EDNS0
packet advertising 2048 UDP defragmentation capabilities of
the query and with the DO bit set.
named was configured without recursion or any logging FN.
The Zone Configuration
We performed the experiment on two configurations. One configuration
[4]ns-pri.ripe.net and one that was to mimic k.root-server.net.
For the ns-pri.ripe.net type experiments, we used
the configuration from 15 June 2005. At this date ns-pri.ripe.net
was authoritative for zones like 193.in-addr.arpa (/8 reverse
zones), 000.193.in-addr.arpa (/16 reverse zones) and their IPv6
variants whose content is dominated by delegation NS RRs 3.94
* 105 in total). Besides these 'delegation-only domains'
there are a number of /24 reverse zones and a couple of small
forward zones that relate to the RIPE NCC infrastructure. These
account for about 0.05*105 RRs roughly equally spread between
PTR, CNAME, A and other resource records.
For the k.root-servers.net type experiments, we created
a configuration where the server was authoritative for the root
zone with SOA serial 2005070400. The server was not authoritative
for other zones like the 'arpa' and 'root-servers.net' that
are normally hosted by k.root-servers.net.
Zone Signing
We created a 2048 bits RSASHA1 key signing key (KSK) and two
zone signing keys (ZSK) varying from 512 to 2048 bits. The ZSKs
and KSK were included in the zone before it was signed with
one ZSK and one KSK, using dnssec-signzone from the
BIND 9.3.1 distribution. In the signed zone all RR sets are
signed with one ZSK. Only the DNSKEY RR set is signed with two
keys - the KSK and one ZSK.
Having two ZSKs in the DNSKEY RR set is expected to be a common
situation for pre-publish zone signing key rollovers as in section
4.2.1 from [KG05].
In the pre-publish ZSK rollover model, the DNSKEY RRset grows
during a ZSK rollover while the number of signatures over the
RR sets in the zone remains constant.
Properties of the
Query Traces
To perform the experiment, we obtained traces from the production
servers. The traces we used contained UDP packets directed at
port 53 of the server machines. The amount of data was roughly
equivalent to about 10 minutes elapsed time and was taken at
a random time for which the query stream did not seem to show
anomalous behaviour.
We used two traces. One trace from ns-pri.ripe.net
and one from
[4]k.root-servers.net. Table 1
summarises the properties of the traces.
The first column of the table lists the identifier used for
the trace during the experiment. The second column lists the
time we started recording the trace. The 3rd column the amount
of UDP packets to port 53 contained in the trace. The 4th column
lists the amount of DNS packets that the analysis script interprets
as DNS packets. The packets that have their opcode set to "QUERY"
and have not been truncated and do not have their query response
flag set are probably bona-fide queries. We analysed those remaining
packets on their EDNS0 content. The results are in Table 2
and the pie charts in Figure 2.
The left pie charts show the distribution between queries
without the EDNS0 extensions, with the EDNS0 extension but without
the DO-bit set and with the EDNS0 extension and with the DO
bit set. The middle pie charts show the UDP defragmentation
sizes advertised by the clients in the set of packets with an
EDNS0 extension. The pie charts at the right show the sizes
for those EDNS0 packets with the DO bit set.
The EDNS0 size distributions clearly differ for the query
streams against the k.root.servers.net (top) and ns-pri.ripe.net
(bottom). While the contribution of the "4096" size to the total
of EDNS0 packets is roughly one third for all traces there is
a distinct difference between the ratio of 1280 versus 2048
EDNS0 sizes. EDNS0 size 1280 makes up for almost 15% of the
EDNS0 packets for the k.root trace while for the ns-pri traces,
the contribution is less than 1 %. The EDNS0 size distribution
is not the same for the queries with and without the DO bit
set. EDNS0 size 1280 is not present for these queries.
The properties of the query streams clearly demonstrate selection
effects. We have not investigated what causes the difference
between the properties of the queries to k.root-servers.net
and ns-pri.ripe.net. If we were to undertake such investigation,
our working hypothesis would be that most of the queries to
ns-pri.ripe.net are targeted to sub-domains ofin-addr.arpa
and that those queries originate from environments where there
is a preference for certain name server implementations.
Table 1: Trace Properties
| Trace ID |
Trace
times |
DNS |
OPCODE |
TC |
QR |
Remaining |
| |
|
packets |
QUERY |
set |
set |
DNS packets |
| k.root |
04/05/2005
5 |
2241766 |
2239638 |
6 |
37 |
2239598 |
| |
23:57:54.338923
|
|
|
|
|
|
| |
00:08:20.165730
|
|
|
|
|
|
| ns-pri |
06/15/2005
|
1711346 |
1705551 |
0 |
0 |
1705551 |
| |
11:39:21.592356
|
|
|
|
|
|
| |
11:49:09.123635
|
|
|
|
|
|
|
Table 2: EDNS0 Properties of the Traces
| ID |
|
Number |
Fraction |
EDNS0 size distribution |
| |
|
|
of total |
512
|
1024 |
1280 |
1500 |
2048 |
4000 |
4096 |
16384 |
| k.root |
E: |
742275 |
34.5% |
215
|
2
|
109000 |
0
|
330591
|
372
|
302088 |
7
|
| |
D: |
227283 |
10.1% |
141
|
0
|
0
|
0
|
89114
|
372
|
137655 |
0
|
| ns-pri |
E: |
1202885 |
70.5% |
1259 |
4
|
8353
|
9
|
745270
|
0
|
447990 |
0
|
| |
D: |
476504 |
27.8% |
538
|
0
|
0
|
9
|
234074
|
0
|
242062 |
0
|
|
|
| The
rows marked 'E:' show the statistics for the DNS
packets with an EDNS0 OPT RR. |
| The
rows marked 'D:' show the statistics for the DNS
packets that have the DO bit set. |
|
|
|
|
|
|
|
|
|
|
|
|
|
We were also interested in the scenario for which all
queries have the DO bit set. We simulated this by modifying
the NSD code, to cheat the server into believing that queries
with EDNS0 but without the DO bit had their DO bit set, and
that queries without the EDNS0 extension had an EDNS0 section
with the DO bit set and an EDNS0 size of 2048. [ADF05] chose to use the minimum
value of 1220 octets. We use 2048 because that is the minimum
value that we've seen in the captured queries that have the
DO bit set.). We only performed measurements with this modified
name server using the k.root-servers.net configuration.
These experiments are marked ``k.modified'' and referred to
as experiments on the ``modified server''.
|