In cases analogous to this, software often saves both
text and binary, and when initializing, uses mtime to
decide whether it can safely use the binary.  Some resources
are spent storing the extra file and admins have yet
another way to screw things up, but the strategy
does have benefits.

John Wobus
Cornell University IT

On Jul 9, 2014, at 11:31 AM, Evan Hunt wrote:

On Wed, Jul 09, 2014 at 03:16:04PM +0200, Reindl Harald wrote:
however, i wonder what takes 90 seconds to load 5000 zones

It scales with both the number of zones and the number of records per
zone.  Some of those zones are probably quite large.

When you're reading text, it takes time to do the lexical analysis and
parsing. When reading text *or* raw, it takes time to examine each node in the zone file, determine its name, walk down through the nodes of a growing
red-black tree, allocate memory, and add the data.

A map file is a memory image of a fully-formed red-black tree; it can
be zapped into memory in one go, then we walk through the tree validating
checksums and updating the pointers, which is obviously much quicker.

(In fact it could be almost instant if we did the checksums-and- pointers bit lazily, as the data was accessed rather than immediately at load time. That introduces a lot of complexity, though; if a zone file is corrupt,
BIND expects to discover the fact right away, not at some random time
later on.)

--
Evan Hunt -- e...@isc.org
Internet Systems Consortium, Inc.
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to