[bind10-dev] Multicore Auth
Yoshitaka Aharen
aharen at jprs.co.jp
Wed Jul 13 00:52:38 UTC 2011
On Tue, 12 Jul 2011 23:52:06 +0200
"Michal 'vorner' Vaner" <michal.vaner at nic.cz> wrote:
> • Multiple processes forked from some kind of parent. The parent loads all the
> data and forks itself multiple times. The children have a (read only) copy of
> the in-memory data source, the other things stay the same as now and happily
> serve answers from there. The OS takes care of the copy-on-writing the pages,
> making the in-memory data effectively shared memory. If the data change, the
> parent just modifies its copy, kills all the children and starts them again
> with new copy. No need to lock or synchronise anything.
>
> The disadvantages are two. One of them is, the C++ allocator kind of likes to
> put data wherever it feels fit, which will fragment the in-memory data and mix
> it with other variables over time. We either need to provide our own allocator
> for this to make sure the data stay together (same as with the shared memory
> version).
>
> The other one is the glorious Windows, which doesn't support fork (as some
> people point out, because it's too sharp and users might get hurt and they
> should use spoon instead).
There seems to be another disadvantage: difficulty in implementing dynamic
updates. One method is to reload at a time of receiving dynamic update
requests, but it is much expensive.
If we don't care about dynamic updates and porting to Windows, fork
model seems to be a simplest way.
--
Yoshitaka Aharen <aharen at jprs.co.jp>
Japan Registry Services Co., Ltd.
More information about the bind10-dev
mailing list