[prev in list] [next in list] [prev in thread] [next in thread]
List: djbdns
Subject: Re: Full featured djbdns jumbo patch
From: John Peacock <jpeacock () rowman ! com>
Date: 2001-10-11 19:09:16
[Download RAW message or body]
Andy Dustman wrote:
>
> A better solution would be: If data is a directory, traverse the
> directory tree, reading each file, and using it's timestamp for the
> default SOA serial number for all zones in that file. Then AXFR tools
> can update individual files within the data directory. To determine if
> data.cdb needs to be rebuilt, check the mtime on all files within data
> and it's subdirectories. Once one is found to be newer than data.cdb,
> rebuild; otherwise leave it alone.
Make will do this second step for you (see below)...
>
> This will take longer than reading a simple data file, but then,
> building data from a bunch of separate files takes time, too. May be a
> worthwhile trade-off in some cases. Case in point: You have ten thousand
> zones you are secondary for. To make a single data file, you have to cat
> ten thousand files together, write it to disk, then run tinydns-data to
> make data.cdb. If data is very large, tinydns-data will probably not be
> able to get much of it out of caches, so all the data is read twice, and
> written twice (once as data, once as data.cdb). OTOH, if tinydns-data
> can read the individual files directly, they only have to be read and
> written once.
If tinydns-data read from a pipe, there would also be a single write
(of data.cdb in this case), ala
cat data/* | tinydns-data -
and you would get the complete data.cdb as a result.
I've recently decided that my domains will be easier to manage as
seperate files, so my Makefile now looks like this:
data.cdb: data
/usr/local/bin/tinydns-data
data: domains/*
fgrep -hv "#" domains/* | sort -u > data
but then I have less than two dozen domains with less than 500 lines
total between them all.
John
--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic