pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig James <craig_james@emolecules.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Occasional giant spikes in CPU load
Date: Wed, 07 Apr 2010 16:07:31 -0700
Message-ID: <4BBD1033.9080905@emolecules.com> (raw)
In-Reply-To: <8127.1270677548@sss.pgh.pa.us>
References: <k2pda0294261004061437p9cd3810dqe9ce528b6ddb0873@mail.gmail.com>
	<m2m603c8f071004071413w1f2d2497hbbe07d9c6491848f@mail.gmail.com>
	<4BBCFB12.1010306@emolecules.com>
	<8127.1270677548@sss.pgh.pa.us>

On 4/7/10 2:59 PM, Tom Lane wrote:
> Craig James<craig_james@emolecules.com>  writes:
>> Most of the time Postgres runs nicely, but two or three times a day we get a huge spike in the CPU load that lasts just a short time -- it jumps to 10-20 CPU loads.  Today it hit 100 CPU loads.  Sometimes days go by with no spike events.  During these spikes, the system is completely unresponsive (you can't even login via ssh).
>> I managed to capture one such event using top(1) with the "batch" option as a background process.  See output below - it shows 19 active postgress processes, but I think it missed the bulk of the spike.
>
>> Any ideas where I can look to find what's triggering this?
>
>> Postgres 8.3.0
>             ^^^^^
>
> If it's really 8.3.0, try updating to 8.3.something-recent.  We've fixed
> a whole lot of bugs since then.

Good advice, I've been meaning to do this, maybe this will be a kick in the pants to motivate me.

> I have a suspicion that this might be an sinval overrun scenario, in
> which case you'd need to update to 8.4 to get a real fix.  But updating
> in the 8.3 branch would be cheap and easy.
>
> If it is sinval overrun, it would presumably be triggered by a whole lot
> of catalog changes being made at approximately the same time.  Can you
> correlate the spikes with anything like that?

Not that I know of.  Just regular web traffic.  On the backup server these events happen occasionally even when there is little or no web traffic, and nobody logged in doing maintenance.

>
> 			regards, tom lane
>




view thread (31+ messages)  latest in thread

Message-ID: <4BBD1033.9080905@emolecules.com>
Permalink:  ../4BBD1033.9080905@emolecules.com/
Also on:    postgresql.org/message-id/4BBD1033.9080905@emolecules.com

 · 

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: craig_james@emolecules.com, tgl@sss.pgh.pa.us
  Subject: Re: Occasional giant spikes in CPU load
  In-Reply-To: <4BBD1033.9080905@emolecules.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