[Pdns-users] Fork vs. threading
bert.hubert at netherlabs.nl
Thu May 18 09:51:01 UTC 2006
On Wed, May 17, 2006 at 11:09:21AM -0600, Darren Gamble wrote:
> We noted that the PowerDNS nameserver uses threading, while the Recursor
> daemon uses a simple "fork" configuration command to run a second process.
> It is described in the documentation as a "bit of a hack". =)
Things are a tad more complicated. The recursor uses advanced userspace
threading, which is incredibly fast, but can only use 1 CPU. So, the --fork
thing simply duplicates the entire recursor, which is why we describe it as
> In this configuration, do the two processes share the same cache somehow?
No, as this would probably destroy the performance advantage. The PowerDNS
recursor does not care that much about CPU, it cares about memory speed. And
using two CPUs means having additional caching abilities. Sharing the cache
would destroy this advantage.
We are considering having both halves asking eachother for missing data
which would be the best of both worlds.
It would still waste memory but what is the price of 1G of ram these days.
> recursor deamon use threads like its nameserver cousin. We're guessing
> that this would help performance (maybe not?), especially on machines with
> more than two processors.
Probably not, --fork is really ideal in this respect.
http://www.PowerDNS.com Open source, database driven DNS Software
http://netherlabs.nl Open and Closed source services
More information about the Pdns-users