]> git.ipfire.org Git - thirdparty/pdns.git/commit
fixes PowerDNS/pdns#666
authorMark Zealey <mark@markandruth.co.uk>
Mon, 2 Dec 2013 09:12:46 +0000 (11:12 +0200)
committerMark Zealey <mark.zealey@itsolve.co.uk>
Mon, 9 Dec 2013 12:07:47 +0000 (12:07 +0000)
commitbca4751c676bfaa14d9076d9654cabd5437bc77e
tree2db5bdd8b44c15156d656a229a7423aad3c3edd8
parentbcd5ac8a1d619c3cb3d536aa46f5e01b276ef676
fixes PowerDNS/pdns#666

SO_REUSEPORT is available on various bsd operating systems as standard, and also as a linux kernel patch from Google. It allows

1) Running 2 powerdns processes concurrently so that you can restart powerdns without loosing any packets
2) (the main purpose for my writing this patch) On linux with a patched kernel removes contention from many threads using a socket. In my tests this improves performance with a packet cache from 300kqps to 1mqps

If the SO_REUSEPORT call is available and the reuseport config option set to yes, the attached patch causes each receiver thread to open a new socket for connections which allows each thread (on linux) to operate at full speed rather than waiting on a slow socket. It should fail nicely ie if the call is not available at either compile time or run time it will just use the initially created socket.

Was merged in to linux 3.9 series - see https://lwn.net/Articles/542629/ for more information
pdns/common_startup.cc
pdns/docs/pdns.xml
pdns/nameserver.cc
pdns/nameserver.hh