From: Tim Cross <theophilusx@gmail.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: C GG <cgg0007@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: LDAP authentication slow
Date: Mon, 04 Jun 2018 07:55:45 +1000
Message-ID: <87y3fvilge.fsf@gmail.com> (raw)
In-Reply-To: <CAMkU=1xsFLktzzkf0NAP3ctDRyboedWuP_zsPzU9J5423Y+XSQ@mail.gmail.com>
References: <CAJXW-z-K1h_2icOgdOaQZzX0d3dz-SQeLxHMi2EFP7Egy0q03Q@mail.gmail.com>
<20180530160451.GS27724@tamriel.snowman.net>
<CAJXW-z_1KBE=Dkhbxt1MUKSD_wPxoyh-dy2xQFaPhr20B+uJSg@mail.gmail.com>
<20180530185018.GT27724@tamriel.snowman.net>
<CAJXW-z9b6ev271L_ByaRFtYartp4nY4iBwpvrcFjqSC-qJUEnQ@mail.gmail.com>
<87zi0gvkrd.fsf@gmail.com>
<CAJXW-z-=CQAHF7FAzJ0mHg1xxPhnKs0zR0vh5RhGT0icBdnc+Q@mail.gmail.com>
<CAMkU=1xsFLktzzkf0NAP3ctDRyboedWuP_zsPzU9J5423Y+XSQ@mail.gmail.com>
Jeff Janes <jeff.janes@gmail.com> writes:
> On Thu, May 31, 2018 at 8:23 AM, C GG <cgg0007@gmail.com> wrote:
>
> In the meantime, I did what I promised Adrian Klaver I would do and I added
>> the AD servers to the /etc/hosts file. That had an immediate and dramatic
>> effect on the performance. That confirms (at least to me) that DNS
>> resolution was playing a large part in the slowdown. I'm going to
>> experiment with running a local DNS caching server to see if that will give
>> the same effect.
>>
>
> I had this problem at one site, and with the same solution. As best as I
> could tell, Windows was not using DNS as the main way of resolving
> hostnames. (People assure me that NetBIOS and WINS are almost completely
> dead, but WireShark tells a different tail--I don't recall the exact name,
> but it was certainly something other than DNS). So the fact that AD's
> built in DNS sucks was not a problem for Windows users, which means there
> was no impetus on the Windows admin to fix it. And the delay on resolution
> was always 5 seconds plus a very small handful of milliseconds. So it was
> clearly some kind of designed throttling or timeout, there is no way random
> congestion could get you so close to 5.00 every time.
>
We had particular problems with a specific client. In the end, it turned
out that this client used a DNS resolve library which, unlike most other
libraries, did not use local DNS cache. Every name lookup involved a
full DNS resolution process. Temporary solution was to use IP addresses
until admins/devs could work out how to fix the client or find a more
robust solution where address isn't 'hard coded'.
At the time, the admins responsible for managing the DNS were getting
frustrated as their service was being blamed for a local client
problem.
Key take away, this stuff can be complex to diagnose and a systematic
evidence based investigation is often required - problem is, that takes
time and is seldom welcomed.
--
Tim Cross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: theophilusx@gmail.com, jeff.janes@gmail.com, cgg0007@gmail.com, sfrost@snowman.net
Subject: Re: LDAP authentication slow
In-Reply-To: <87y3fvilge.fsf@gmail.com>
References: <CAJXW-z-K1h_2icOgdOaQZzX0d3dz-SQeLxHMi2EFP7Egy0q03Q@mail.gmail.com> <20180530160451.GS27724@tamriel.snowman.net> <CAJXW-z_1KBE=Dkhbxt1MUKSD_wPxoyh-dy2xQFaPhr20B+uJSg@mail.gmail.com> <20180530185018.GT27724@tamriel.snowman.net> <CAJXW-z9b6ev271L_ByaRFtYartp4nY4iBwpvrcFjqSC-qJUEnQ@mail.gmail.com> <87zi0gvkrd.fsf@gmail.com> <CAJXW-z-=CQAHF7FAzJ0mHg1xxPhnKs0zR0vh5RhGT0icBdnc+Q@mail.gmail.com> <CAMkU=1xsFLktzzkf0NAP3ctDRyboedWuP_zsPzU9J5423Y+XSQ@mail.gmail.com> <87y3fvilge.fsf@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox