Remove global DNSDistributor #583

Closed
Habbie opened this Issue Apr 26, 2013 · 2 comments

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

Patch against pdns-3.1 svn tag

I was seeing big contention issues with only having 1 DNSDistributor for the
whole of powerdns. With lots of receiver threads & backends the performance
really suffers - in one test (going through lots of domains with 16 receiver
threads & 16 distributors) I got 9kqps before, and with the attached patch
40kqps. I suspect this is because the packet is being passed between different
cores rather than staying within the same processor. The attached patch
reduces the time that mutex is held in the distributor and also switches the
distributor from a global to a per-receiver thread setting.

I have found that the best setting now for powerdns performance is:

receiver-threads=
distributor-threads=1

This has the additional advantage of activating the bypass in the distributor
to switch it to work in unthreaded mode which should increase cpu affinity
significantly..

IMPORTANT NOTE: This changes the meaning of the distributor-threads setting
from the total number of distributor-threads to the number of
distributor-threads per receiver-thread. You could perhaps add some logic in to
perform division if you don't want the meaning of this setting to change.

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie
Member
Habbie commented Apr 26, 2013

Attachment '' (distributors-per-thread.patch) https://gist.github.com/5466799

@Habbie
Member
Habbie commented Apr 26, 2013

Author: ahu
Applied, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment