[Pdns-users] Fork vs. threading

Darren Gamble darren.gamble at sjrb.ca
Thu May 18 18:15:09 UTC 2006

Good day,

Thanks for your quick reply, again!

> Things are a tad more complicated. The recursor uses advanced
> 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
> as
> a 'hack'.

Sounds good.  We were just under the impression that this was a
"workaround" until you had a better situation in place- but if it's the
best way to do it, then great.
> We are considering having both halves asking eachother for missing
> which would be the best of both worlds.

If you're going to do this, you might also want to consider implementing
a simple algorithm to "assign" a certain process the task of storing a
given name, based on the name itself.  Load balancers in front of caches
or proxies use this method.  This would mean that a query for name
"example.com" would always hit process #n, which would increase your hit
rate and reduce the number of times that the processes would have to
talk to one another.  Of course, caches use other cached information to
resolve names... but again, it's just a suggestion!

> It would still waste memory but what is the price of 1G of ram these

We were considering more the ramifications of having two different sets
of data on the same physical cache, which would likely have different
TTLs and possibly different rdata.  It would make troubleshooting across
different queries interesting, at the very least! :-)

Thanks again!

Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948

More information about the Pdns-users mailing list