pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Habib Nahas <habibnahas@gmail.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Autoanalyze CPU usage
Date: Wed, 20 Dec 2017 08:15:39 +0100
Message-ID: <1513754139.2459.10.camel@cybertec.at> (raw)
In-Reply-To: <CAE1bBP6_=BmZa+xA32AJXF8-BU4h5XAK-aCKOVQLfYyUfVd2ug@mail.gmail.com>
References: <CAE1bBP4vxmMxtC0w37OhDv36M9f8222AbXfy0LWnynWf88ZS-Q@mail.gmail.com>
	<d965ed83-4dd4-bde4-f6fe-62bf5cf8adfd@2ndquadrant.com>
	<CAE1bBP6_=BmZa+xA32AJXF8-BU4h5XAK-aCKOVQLfYyUfVd2ug@mail.gmail.com>

Habib Nahas wrote:
> The CPU spike occurred between 13:05 - 13:15. last_autoanalyze for the table
> shows a time of 12:49; last_autovacuum does not show any activity around
> this time for any table. Checkpoint logs are also normal around this time.
> I'd like to understand if there are any other sources of activity I
> should be checking for that would account for the spike.

last_autoanalyze is set after autoanalyze is done, so that would suggest
that autoanalyze is not the problem.

It can be tough to figure out where the activity is coming from unless
cou can catch it in the act.  You could log all statements (though the amount
of log may be prohibitive and can cripple performance), you could log
just long running statements in the hope that these are at fault, you
could log connections and disconnections and hope to find the problem
that way.  Maybe logging your applications can help too.

Yours,
Laurenz Albe




view thread (10+ messages)  latest in thread

Message-ID: <1513754139.2459.10.camel@cybertec.at>
Permalink:  ../1513754139.2459.10.camel@cybertec.at/
Also on:    postgresql.org/message-id/1513754139.2459.10.camel@cybertec.at

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: laurenz.albe@cybertec.at, habibnahas@gmail.com, tomas.vondra@2ndquadrant.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Autoanalyze CPU usage
  In-Reply-To: <1513754139.2459.10.camel@cybertec.at>

* 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