[collectd] frequent dns queries

Florian Forster octo<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>verplant.org
Fri Dec 8 08:03:10 CET 2006

Hi Kevin,

On Thu, Dec 07, 2006 at 06:26:36PM -0500, kcheek<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>umich.edu wrote:
> When running in server mode, collectd seems to generate a large amount
> of dns queries unless client ip addresses are added to /etc/hosts.
> Would it be easy to modify the code so it doesn't generate so many dns
> queries? (cache the dns responses somehow, etc.)

upon every package received, the server calls `getnameinfo' to resolve
to client's IP-address to a hostname. This is most likely where the
queries originate. The next major version will use another network
protocol which will transmit the hostname in the packets, making the
call to getnameinfo unecessary.

For now it's easier to cache the names for a given interval. I didn't do
this in the first place because I figured that the nameserver does a
much better job at this than I ever could ;) However, caching the values
for at least one run (i. e. clear the cache every 10 seconds) should be
easy enough. I'll look into this.

> Needing to modify /etc/hosts seems to detract from that advantage just
> a little bit, especially in larger installations.

I think your best bet for very large installations is, right now, to
install a caching nameserver on the same host.

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20061208/1fe377a3/attachment.pgp

More information about the collectd mailing list