[Dovecot] stats plugins causing dns lookup per connection

Kelsey Cummings kgc at corp.sonic.net
Tue Mar 12 06:51:36 EET 2013


I noticed our imap servers were generating a lot of A record lookups for
their own IP's the other day and just got around to tracking down the
source.  Seems like they are all being caused by guid_128_generate() -
perhaps the lookup could be cached at start up or it could just use make
use of the hostname rather than spending the effort to get the IP via
gethostbyname() calls.  The function is used in a few other places too,
so this might help more than just the stats plugin.

nscd and/or host entries mitigate the total time spent on the lookup of
course, but it seems unnecessary.

-- 
Kelsey Cummings - kgc at corp.sonic.net      sonic.net, inc.
System Architect                          2260 Apollo Way
707.522.1000                              Santa Rosa, CA 95407


More information about the dovecot mailing list