Re: Autoanalyze CPU usage

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Habib Nahas <habibnahas(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Autoanalyze CPU usage
Date: 2017-12-20 07:15:39
Message-ID: 1513754139.2459.10.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Nikolay Samokhvalov 2017-12-20 08:24:09 Re: Autoanalyze CPU usage
Previous Message Michaeldba@sqlexec.com 2017-12-20 01:10:51 Re: Autoanalyze CPU usage