[dns-operations] DNS server benchmarking sanity check

Hannes Frederic Sowa hannes at stressinduktion.org
Tue Aug 16 09:25:16 UTC 2016

On 14.08.2016 23:19, Mark Delany wrote:
> On 14Aug16, Anand Buddhdev allegedly wrote:
>> NSD can spawn multiple processes, and each process binds to a socket.
>> However, the kernel doesn't distribute queries evenly amongst the
>> processes. This can lead to some processes being overworked while others
>> are lightly loaded.
>> SO_REUSEPORT solves this by letting the kernel divide the queries much
>> more evenly amongst all the processes, so that they can deliver the
>> maximum number of responses each.
> In either case, about a year or two ago, I found that the mainstream
> kernels still do a lot of serialization in the UDP stack such that
> it's not possible to utilize all available cores on a modern machine.
> It's possible that has changed recently, but it generally seems that
> UDP hasn't had the love that TCP gets.

Linux has a lockless UDP transmit path already. We still rely on heavy
machinery and lot's of checks, but basically one can pump packets out
quite quickly.

Unfortunately we still don't have a lockless receive and the question is
if that is actually worth doing so, as SO_REUSEPORT (as already
mentioned in the thread earlier solves the same problem).

I actually think that the kernel is spending time in other parts of the
stack and not the UDP layer. I simple perf record session during DNS
benchmarks could help verifying this.


More information about the dns-operations mailing list