ANNOUNCEMENT: NSD 1.4.0 alpha 1

This release is an alpha release. We are currently not planning to have a 1.4.0 stable release as we want to prioritize implementing DNSSEC first. The next stable release will then be NSD 2.0.0 with DNSSEC support.

This release has some major changes: the database format is much more compact, responses are generated on-the-fly instead of being precompiled in the database, and the new FLEX/YACC based compiler is now the only supported compiler (and simply called zonec).

Please read the README document for configuration and installation
instructions.

You can download NSD from http://www.nlnetlabs.nl/nsd/

1.4.0-alpha1

a message of 36 lines which said:

responses are generated on-the-fly instead of being precompiled in
the database,

What are the consequences on performance? I thought that one reason
why nsd was so much faster (and does not load the CPU as much as BIND)
is the precompiled responses.

        - Name compression is done dynamically, removing one other
          difference with BIND in the responses generated (the full
          query name is now used for compression).

If we start generating responses on-the-fly, what about round-robin?

Stephane Bortzmeyer wrote:

a message of 36 lines which said:

responses are generated on-the-fly instead of being precompiled in the database,

What are the consequences on performance? I thought that one reason
why nsd was so much faster (and does not load the CPU as much as BIND)
is the precompiled responses.

NSD 1.4.0 is slower than NSD 1.2.2 and previous versions. The actual drop in performance very much depends on:

1. Zone size.
2. CPU performance of the server.
3. Network I/O performance of the server.

Remember that on our test platform (Athlon XP 2400+, cheap and probably slow network card) NSD 1.2.x and the OS spends most of its time doing network I/O. This is still true for NSD 1.4.0.

With a small zone (for example, the root zone) the rest of the time is divided in name lookup and generating the response. NSD 1.4.0 is about 30% slower CPU wise than NSD 1.2.2. In one test we did that resulted in NSD 1.2.2 being able to respond to ~18770 packets/sec, with NSD 1.4.0 getting ~15964.

With a large zone (900,000+ domains) most of the non-network I/O cpu time is done performing name lookups. Generating packets take a relatively small percentage of CPU time, so the difference between 1.2.2 and 1.4.0 is much less: 1.2.2: 15649 p/s vs 1.4.0: 15082 p/s.

Another difference is memory usage. NSD 1.4.0 uses less memory than 1.2.2 on a 32-bit platform. Memory usage is probably similar or slightly more on a 64-bit platform due to the heavy use of pointers in NSD 1.4.0.

Note that NSD 1.4.0 is still much faster than bind 8.3.6 (~4 times less CPU usage, NSD 1.2.2 is about ~4.5 less CPU usage in the tests that I did using a large zone). In that test run NSD 1.2.2 managed to answer about 4.2 million packets, 1.4.0 about 4.1 million, and bind 8.3.6 about 1.2 million. I'm not sure how many packets actually got send and I don't have the notes here right now, so these numbers are what I can remember :slight_smile:

Note that all these numbers are preliminary. I've spend enough time performance testing to see performance was not greatly affected due to the changes, but not enough to get precise, high quality numbers.

If we start generating responses on-the-fly, what about round-robin?

I don't think we want to go there. I also do not know what effects round-robin has on DNSSEC etc. Right now our priority is to get DNSSEC working correctly. We knew DNSSEC would have some performance cost and so far the cost seems acceptable to us. After DNSSEC is working correctly we may look at cpu and memory usage to see what we can improve.

Hopefully people will test performance on their own machines and let us know if the performance drop is not acceptable. I'm especially interested in numbers from servers with (relatively) slow CPUs and fast network I/O.

A final note on why we made these changes. Adding DNSSEC in the "obvious" way to the precompiled answer database would probably have resulted in a database that was 2-3 times larger just because of duplication of answer data (non-DNSSEC answer, DNSSEC answer, DNSSEC NXDOMAIN answer). Combined with the fact that a signed zone is about 4-6 (?) times larger than the non-signed zone this would result in a database size that was 8-18 times larger. Even in the best case that would result in a 1.3 gig NL zone database (170 Mb currently). This gets pretty close to the limits of 32-bit machines and architectures.

The alternative would be to cut these packets up (non-DNSSEC part, DNSSEC parts) and combine them depending on the query. This would require less memory but more CPU time. We figured this approach was too complicated and would not gain us much in CPU performance over the approach taken with NSD 1.4.0. The signed NL zone 1.4.0 database is just 264 Mb, with NSD using about ~450 Mb memory when running on a 32-bit machine. The signed zone file itself is 325 Mb, larger than the compiled database :slight_smile:

I hope this clarifies things more than it obfuscates :slight_smile:

Erik

Once Erik Rozendaal wrote:

A final note on why we made these changes. Adding DNSSEC in the
"obvious" way to the precompiled answer database would probably have
resulted in a database that was 2-3 times larger just because of
duplication of answer data (non-DNSSEC answer, DNSSEC answer, DNSSEC
NXDOMAIN answer). Combined with the fact that a signed zone is about
4-6 (?) times larger than the non-signed zone this would result in a
database size that was 8-18 times larger. Even in the best case that
would result in a 1.3 gig NL zone database (170 Mb currently). This
gets pretty close to the limits of 32-bit machines and architectures.

The alternative would be to cut these packets up (non-DNSSEC part,
DNSSEC parts) and combine them depending on the query. This would
require less memory but more CPU time. We figured this approach was too
complicated and would not gain us much in CPU performance over the
approach taken with NSD 1.4.0. The signed NL zone 1.4.0 database is
just 264 Mb, with NSD using about ~450 Mb memory when running on a
32-bit machine. The signed zone file itself is 325 Mb, larger than the
compiled database :slight_smile:

This is where I disagree. As people might have noticed I'm not in the
NSD development team anymore and do not influence the design choices.
I've been watching the changes to NSD in the last half year (or should I
say a complete rewrite of it) and to my regret I dont like the development
route the team has chosen. The ``too complicated'' approach as Erik says
is not complicated at all and would have required minimum changes to NSD
design. What I see happening is that NSD is loosing its unique characteristics
which defies the very purpose for its development. To come to think of it
I should probably have started an open discussion about these choices
on nsd-users list back then, NSD is an open source software anyways.

I'm even thinking about implementing DNSSEC for 1.2.2 myself, but lacking
cooperatiion from the nlnetlabs and test platform I guess it is not very
realistic plan.

Of course we have to see what will happen, but it would be very upsetting
for me if the new versions of NSD deminish its reputation.

Sorry guys, had to get it off my chest.

Alexis

[On 07 Nov, @10:07, Erik wrote in "Re: ANNOUNCEMENT: NSD 1.4.0 al ..."]

the changes, but not enough to get precise, high quality numbers.

>If we start generating responses on-the-fly, what about round-robin?

I don't think we want to go there. I also do not know what effects

it is an explicit non-goal (it says so somewhere in the REQUIREMENTS doc).

grtz Miek

[Quoting Alexis Yushin, on Nov 7, 11:31, in "Re: ANNOUNCEMENT: NS ..."]

I'm even thinking about implementing DNSSEC for 1.2.2 myself, but lacking
cooperatiion from the nlnetlabs and test platform I guess it is not very
realistic plan.

Alexis,

NLnet Labs has been, and still is, very much in favor of cooperation
with you and any other person who wants to contributes ideas and/or
code to NSD. You also you still have full access to our TestLab.

So I don't understand what you said above,
-- ted

Once Ted Lindgreen wrote:

[Quoting Alexis Yushin, on Nov 7, 11:31, in "Re: ANNOUNCEMENT: NS ..."]

I'm even thinking about implementing DNSSEC for 1.2.2 myself, but lacking
cooperatiion from the nlnetlabs and test platform I guess it is not very
realistic plan.

Alexis,

NLnet Labs has been, and still is, very much in favor of cooperation
with you and any other person who wants to contributes ideas and/or
code to NSD. You also you still have full access to our TestLab.

What I said is that I think the labs made a wrong design choice and
when I wanted to discuss it back in the summer there did not come much
of a discussion. I dont want to start a ``flame'' but like I said I
dont like the way its going with NSD.

But if what you said about is true then I guess I'd either try to find
time to implement DNSSEC my way or shut up. Which means code split but
then so be it.

Either way I'm not going to write anything negative to the nsd-users list
anymore.

Alexis