[bind10-dev] Shared memory data source ideas

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Mon Mar 19 18:35:29 UTC 2012


At Fri, 16 Mar 2012 19:20:45 +0100,
Michal 'vorner' Vaner <michal.vaner at nic.cz> wrote:

> > We could also use an on-disk memory image (which would be mmaped).  It
> > will make the initial load time effectively zero.  I was not sure if
> > such an option is included in the above document.
> 
> I don't mind doing so, but I think it's the next step. If we have a data image
> with relative only pointers, it is easy to dump to disk and restore later (I'm
> not sure if it is better to mmap or just read into memory, the first might be
> very slow on startup as it seeks a lot, while the second can read the data with
> speed of 100MB/s or so and once done, we're at full speed). I don't think we
> need to worry about it right now.

It may depend on the OS, but from my limited an quick experience, if
(at least the vast majority of) the mapped pages aren't swapped out
(which would often be the case, e.g. when you quickly restart the
whole system after version up), it can work at its full speed
immediately after mmap().  In the case of "cold start", I suspect we
could still accelerate the load by just peeking at a small portion of
every page (although admittedly it's a very low level operation and
may not be so different in practice than just reading the entire data
into the memory).

In any case, I'm okay with considering this a future extension.

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.


More information about the bind10-dev mailing list