[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@corp.sonic.net sonic.net, inc. System Architect 2260 Apollo Way 707.522.1000 Santa Rosa, CA 95407
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
On 03/12/13 06:58, Axel Luttgens wrote:
started for seemingly unrelated reasons, but ended with some form of cacheing of the results fetched with gethostbyname().
It is a bit odd that it would totally block unless DNS requests on your hosts weren't working at all - and even then, the requests would timeout eventually and unblock.
Which version of Dovecot are you running?
2.1.13
I see that caching is in 2.2 now too. Timo, if there are any other 2.1.x releases it'd be nice to get this back ported to it as well.
-K
participants (2)
-
Axel Luttgens
-
Kelsey Cummings