Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Sep 2006 16:55:21 -0300
From:      Marcelo Gardini do Amaral <marcelo@registro.br>
To:        freebsd-stable@freebsd.org
Cc:        freebsd-net@freebsd.org
Subject:   DNS query performance
Message-ID:  <20060911195521.GD63300@registro.br>
In-Reply-To: <20060904130827.GE12975@registro.br>
References:  <E1GIMNJ-0000Dd-QH@cs1.cs.huji.ac.il> <2a41acea0608301145j7bbed961j33ce903a27d8963d@mail.gmail.com> <20060904130827.GE12975@registro.br>

next in thread | previous in thread | raw e-mail | index | archive | help
I would like to discuss a little bit more about UDP performance. I've
made some tests and the results may have some value here.

In this test is easy to see that there is something different in the
FreeBSD 6 branch.

I made a benchmark with bind 9.3.2 (without threads support) and nsd
3.0.1 (1 server forked) on a HP Proliant Dual AMD Opteron 2.4GHz among
FreeBSD 4.11, 6.1 and Linux kernel 2.6.15, all of them for i386
systems. I used this simple zone file:


# cat db.FOO.BAR
$TTL 86400
@               172800 in soa foo.dns.bar. hostmaster.foo.bar. (
                2006090601      ;serial
                1800            ;refresh 30 minutos
                900             ;retry 15 minutos
                604800          ;expire 7 dias
                900 )           ;negative caching 15 minutos
                172800 in ns foo.dns.bar.

; zone delegation begin
test1 IN NS qq1.bsd.
test2 IN NS qq2.bsd.
test3 IN NS qq3.bsd.
test4 IN NS qq4.bsd.
test5 IN NS qq5.bsd.
test6 IN NS qq6.bsd.
test7 IN NS qq7.bsd.
test8 IN NS qq8.bsd.
test9 IN NS qq9.bsd.


In another box with the same hardware I used FreeBSD 4.11 and
queryperf (DNS Query Performance Testing Tool) as a client to realize
1.000.000 of NS queries on the servers. Below I show the results:


                   queries per second

OS                 Bind 9.3.2   NSD 3.0.1
----               ----         ----

Linux 2.6 SMP      38845        59645

FreeBSD 4.11 SMP   34977        59417

FreeBSD 4.11 UP    33926        59547

FreeBSD 6.1 SMP    14953        15908

FreeBSD 6.1 UP     15516        14752



Comments:

Linux had a performance just 10% better than FreeBSD 4.11 with
bind. With nsd I didn't see any difference between them. There is no
difference also tweaking the kernel from UP to SMP.

With nsd the performance was improved to ~60k queries per second on
4.11 and Linux, i.e., it was almost doubled comparing with bind. I
couldn't see any packet loss in any case.

On the other hand, on FreeBSD 6.1 the result was lower than half of
bind's performance on the others systems tested. And with nsd the
result didn't get better (unlike happend on FreeBSD 4.11). I also got
some 'timeout' on FreeBSD 6.1 - about 200 from 1M packets were lost.

In actual fact, I think that is important to emphasize that the same
limit was reached on both name servers - no more than ~15k queries per
second was possible on 6.1. I think there is an issue on the system,
not on bind neither nsd.

Besides this, I've noticed some problems with bge interface
driver. Many times the interface is up and running and suddenly goes
down, without any reason, or after a reboot it doesn't go up. And if
you just remove and insert again the cable, everything returns to
work. On up-to-date FreeBSD 6 boxes I don't see this problem so often,
but with 'netstat -i' it's possible to find some input errors - I was
used to see no errors on 4.11 and others.

Does anybody noticed this behavior? 

For my purpose, the UDP performance is very important. I would be glad
with any kind of help to tune my box and improve its performance.

For those who wants to try, the queryperf can be found in the bind
source tree, at bind-9.3.2/contrib/queryperf. I used a query load file
like this (1M of lines making reference to the zones in db.FOO.BAR):

# cat query.txt

test1.foo.bar NS
test7.foo.bar NS
test8.foo.bar NS
test9.foo.bar NS
test2.foo.bar NS
...


Cheers,

Marcelo Gardini





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060911195521.GD63300>