Maintained by: NLnet Labs

[Unbound-users] Benchmarking Unbound

W.C.A. Wijngaards
Fri Feb 11 12:58:44 CET 2011

Hash: SHA1

Hi Michael,

This may surprise you, but this is actually a frequently asked question
for the unbound server from people that try to measure its speed.
(Boast: this is because of its speed).

On 02/10/2011 10:36 PM, Michael Watters wrote:
> I am currently testing unbound as part of a current project however
> I'm seeing some wildly different results comparing unbound-control
> stats to what queryperf results show.  For example, I've logged the
> output of total.num.queries to a file every second and calculated the
> average result which shows 9474 queries per second, queryperf shows
> 6945 qps.  Both results are from the same test load.

I see two explanations.  The first, and my experience with others doing
benchmarks, is that unbound outperforms queryperf.  The second is a
buffer overrun.

Unbound outperforms queryperf.  Thus, it sends back more than queryperf
can handle.  The measurement you got from queryperf is the speed of
queryperf itself.

Buffer overruns can be seen with netstat -su.  The options so-rcvbuf and
so-sndbuf can help you stop the buffer overruns for unbound.

If you want faster results,

> What is the proper way to monitor and benchmark the queries per second
> on an unbound server?

Since unbound outperforms your sender, you must make your sender
stronger.  Start by using its own computer for the sender (do not run it
on the server itself, this server is busy with unbound, and you have
configured num-threads to the number of cpus in /proc/cpuinfo so it uses
all CPUs, right? Also you want to include the speed of the IP stack in
the result).  Then add another computer that runs queryperf (you can add
up the result qps for the two computers that run queryperf).  Add more
computers until the qps no longer goes up, or goes down a bit (a denial
of service on the unbound server).  That is the measured speed.

- From Jan-Piet Mens (who wrote a book about it), I heard he ended up with
a whole classroom of pcs running queryperf :-)

Best regards,
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with SUSE -