[rbldnsd] BL data preprocessing

Michael Tokarev rbldnsd@corpit.ru
Fri, 28 Mar 2003 17:23:23 +0300


Dmitry Agaphonov wrote:
> Hello,
> 
> Are there any specific actions to do on very large zones data files for
> further rbldnsd perfomance (loading zones, lookup etc.)?  For example,
> sorting in some order or anything else?

None.  Well...  With key-value data (e.g. spews-like), keep entries with
the same VALUE together, i.e.

NOT:

  1.2.3.4   foo.org spammers
  1.2.3.5   bar.baz spammers
  1.2.3.6   foo.org spammers
  1.2.3.7   bar.baz spammers

but this way:

  1.2.3.4   foo.org spammers
  1.2.3.6   foo.org spammers
  1.2.3.5   bar.baz spammers
  1.2.3.7   bar.baz spammers

This is because rbldnsd has little optimization here (it does not
store the same text many times in memory, so it have to find if
the text to be stored is already there).  I think that this order
of things is more human-natural.

Over than that, no optimization in pre-sorting of keys is necessary.
qsort() routine is damn fast sorting large amounts of data.

/mjt