[Pdns-users] Two questions about powerdns
Norbert Sendetzky
norbert at linuxnetworks.de
Sun Feb 12 11:58:51 UTC 2006
On Sunday 29 January 2006 15:00, Derrik Pates wrote:
> Norbert Sendetzky wrote:
> > I've implemented something similar in the opendbx backend. Similar
> > because the patch that was attached to your mail has some major
> > performance implications.
>
> How so? For the gsql backend, the whole idea is for it to generate
> *fewer* queries, not more. It only generates one additional query to get
> the zone serial, the 'select max(change_date) from records where
> domain_id=%d' query. Assuming that works, it skips the (old, bad) way of
> dumping every record for the zone. I could probably remove that stuff
> anyway, since for some reason, it doesn't actually work.
If you think about installations between 10k and 100k domains, you have to do
the same number of queries. OK, it's much less than before, but it's still a
performance issue if you check every few minutes.
> > The implementation in the opendbx backend (patch sent to pdns-dev) uses
> > the change_date field in the SOA row if the serial field in the SOA
> > record is set to 0. This simplifies the task for the backend very much
> > and doesn't cost any additional resources. It also simplifies the
> > management issue because the tools don't have to parse and change the SOA
> > records. The only annoyance is that the management tools must set the
> > change_date field of the SOA row if a record in the zone is changed,
> > which requires two queries instead of one.
> >
> > Is this a feasable way to solve the problem?
>
> Not really, since at that point you may as well just explode the SOA and
> update the serial, it's not significantly more work. The whole *point*
> of my patch is to reduce the scan-all stuff into a single query (which
> on a sanely-indexed tablespace will be pretty cheap) as opposed to the
> scan-all-records-in-zone method.
I want to do some more optimizations!
Currently your method works because the whole result of the first query is
stored in memory before you start querying domain by domain. I removed that
stuff in the opendbx backend to save memory and now I can't start a query
while the the first one is returning results.
Maybe a LEFT JOIN on the same table (records) does the same job as yours in
one query. I will try to figure that out.
Norbert
--
OpenPGP public key
http://www.linuxnetworks.de/norbert.pubkey.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20060212/5da6b224/attachment.sig>
More information about the Pdns-users
mailing list