[bind10-dev] shared memory data source: file-based (mmap) vs memory-only
Shane Kerr
shane at isc.org
Thu Feb 28 12:35:46 UTC 2013
Jinmei,
On Wednesday, 2013-02-27 21:05:01 -0800,
JINMEI Tatuya / 神明達哉 <jinmei at isc.org> wrote:
> Before detailing the feature and breaking it into development tasks,
> I have two big questions to discuss. This is one of them.
>
> There are roughly two choices:
> 1. use a file (or files) containing the memory image and map it to the
> memory
> 2. build everything in-memory
> As far as I can see and based on my quick experiments, both classes
> will meet our minimal need. The major difference is the use of
> concrete files.
>
> I personally prefer the file-based approach, because this can work as
> a persistent on-disk copy that enables nearly-zero (hot start case) or
> a few-to-10-ish seconds (cold start case, with some initial work) of
> start up time. The major disadvantage is management overhead of the
> files and the risk of having corrupt on-disk images.
>
> Do others have opinions/preferences on this?
No preference on my side.
> On a related note: I remember there was a mention of the use of
> copy-on-write when updating the current version of the shared memory
> image. As far as I can see, we can't benefit from it, at least not if
> we use the above Boost utility classes. We'll first need to make a
> complete copy of the current image, either on disk or in-memory and
> then updated the copied version.
I looked a little under the hood, and it seems like the use case of
efficiently cloning a shared-memory segment doesn't have any answer,
outside of fork(). :(
Cheers,
--
Shane
More information about the bind10-dev
mailing list