Re: response time is very long in PG9.5.5 using psql or jdbc

From: David Gould <daveg(at)sonic(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 石勇虎 <SHIYONGHU651(at)pingan(dot)com(dot)cn>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: response time is very long in PG9.5.5 using psql or jdbc
Date: 2018-02-13 22:42:24
Message-ID: 20180213144224.1fef38bb@engels
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 13 Feb 2018 14:21:02 -0800
Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2018-02-13 17:06:36 -0500, Tom Lane wrote:
> > Now, those issues seemed to be associated with needing to rebuild the
> > relcache init file, so you wouldn't expect them to repeat on every
> > connection ... but maybe the OP has something going on that causes the
> > init file to get invalidated constantly. That'd have to be on top of
> > some other massive performance problem, but at least you could see how
> > catalog bloat could possibly lead to this type of symptom, seeing that
> > init file rebuild requires some catalog seqscans.
>
> One of the OP's examples shows the connection establishment separate
> from the slowdown however. Shouldn't that preclude relcache init file
> rebuilds being involved?

I can't account for all the behaviors, but we have a job that spawns 100
connections to process a heavily sharded set of tables in parallel every few
minutes. Normally it runs for a few minutes, but it will extend a lot, eg
hours when the catalogs get severely bloated. I'm assuming that the relcache
init scans are chasing each others buffers out of memory as the system is
completely IO bound when this happens.

Not saying for sure that this is what is happening to the OP, but it may be
similar.

-dg

--
David Gould daveg(at)sonic(dot)net
If simplicity worked, the world would be overrun with insects.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2018-02-13 23:53:21 Re: response time is very long in PG9.5.5 using psql or jdbc
Previous Message Tom Lane 2018-02-13 22:37:09 Re: response time is very long in PG9.5.5 using psql or jdbc