pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Gould <daveg@sonic.net>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 石勇虎 <SHIYONGHU651@pingan.com.cn>
Cc: pgsql-bugs@postgresql.org
Subject: Re: response time is very long in PG9.5.5 using psql or jdbc
Date: Tue, 13 Feb 2018 14:42:24 -0800
Message-ID: <20180213144224.1fef38bb@engels> (raw)
In-Reply-To: <20180213222102.ku2o3oy3tvasn3hx@alap3.anarazel.de>
References: <72aa8c39225549dd8c1d18f96df8b1e3@pingan.com.cn>
	<30153.1518488973@sss.pgh.pa.us>
	<a82e97e75d05417da514e2c82dd8fb51@pingan.com.cn>
	<30157.1518548280@sss.pgh.pa.us>
	<20180213132447.0a26f00c@engels>
	<20180213213110.5ip4hsnu2hjz52ae@alap3.anarazel.de>
	<7656.1518559596@sss.pgh.pa.us>
	<20180213222102.ku2o3oy3tvasn3hx@alap3.anarazel.de>

On Tue, 13 Feb 2018 14:21:02 -0800
Andres Freund <andres@anarazel.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@sonic.net
If simplicity worked, the world would be overrun with insects.




view thread (11+ messages)  latest in thread

Message-ID: <20180213144224.1fef38bb@engels>
Permalink:  ../20180213144224.1fef38bb@engels/
Also on:    postgresql.org/message-id/20180213144224.1fef38bb@engels

 · 

reply

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-bugs@postgresql.org
  Cc: daveg@sonic.net, andres@anarazel.de, tgl@sss.pgh.pa.us, SHIYONGHU651@pingan.com.cn
  Subject: Re: response time is very long in PG9.5.5 using psql or jdbc
  In-Reply-To: <20180213144224.1fef38bb@engels>
  References: <72aa8c39225549dd8c1d18f96df8b1e3@pingan.com.cn> <30153.1518488973@sss.pgh.pa.us> <a82e97e75d05417da514e2c82dd8fb51@pingan.com.cn> <30157.1518548280@sss.pgh.pa.us> <20180213132447.0a26f00c@engels> <20180213213110.5ip4hsnu2hjz52ae@alap3.anarazel.de> <7656.1518559596@sss.pgh.pa.us> <20180213222102.ku2o3oy3tvasn3hx@alap3.anarazel.de> <20180213144224.1fef38bb@engels>

* 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