[bind10-dev] Thinking aloud: Multi-CPU auth
Danny Mayer
mayer at gis.net
Tue Feb 8 04:50:32 UTC 2011
On 12/22/2010 7:57 AM, Michal 'vorner' Vaner wrote:
> Hello
>
> On Mon, Dec 20, 2010 at 08:34:13PM +0000, Stephen Morris wrote:
>> I think that the small overhead of adding process management to
>> the
server is more than compensated by the for by the simplicity of the
solution. However, there is one disadvantage - it won't work on Windows,
which doesn't have the idea of fork().
>
> Yes, but are we expecting someone to run heavily loaded authoritative server on
> windows? Or are we allowed to wish what OS we would like for more extreme
> performance?
>
How heavily loaded a server is is irrelevant to whether or not you run a
server on Windows. The way I usually emulate a fork on Windows is to
create a separate thread, except that in the case of Bind10 the code is
not thread-safe so you then have to go through hoops to create a
separate process, find a way to reference the memory you wish to "share"
and make sure you find all of the pieces you want to share. You are
asking a very difficult thing to do in order to get Bind10 to run on
Windows at all. On top of everything you then have to make sure that the
memory references are refreshed whenever the "owner" of that memory
makes changes to it. It's a horror show waiting to happen.
Tell me again why you didn't make sure that the code was thread-safe
even if you are not using threads? It also will prevent you from using
I/O Completion Ports on Windows since that requires threads.
>> Regarding frequency with which these operations are done, the
>> co.uk
zone is updated using dynamic updates every minute. So we would need to
think about restarting processes on a minute-by-minute basis.
>
> Sure, that's the downside. But, as fork is relatively cheap, 1 fork() per CPU
> and minute should probably be enough (how many answers per second do we expect
> on a single CPU? 10k? 100k? In any case, it is more than half milion answered
> queries per fork).
There's no real equivalent to fork() on Windows. It won't be cheap on
Windows.
Danny
More information about the bind10-dev
mailing list