Kelsey Cummings
2013-Mar-12 04:51 UTC
[Dovecot] stats plugins causing dns lookup per connection
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
Axel Luttgens
2013-Mar-12 13:58 UTC
[Dovecot] stats plugins causing dns lookup per connection
Le 12 mars 2013 ? 05:51, Kelsey Cummings a ?crit :> 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.Hello Kelsey, This one: http://www.dovecot.org/list/dovecot/2013-February/088286.html started for seemingly unrelated reasons, but ended with some form of cacheing of the results fetched with gethostbyname(). Which version of Dovecot are you running? Axel