Re: PostgreSQL: CPU utilization creeping to 100% - Mailing list pgsql-general

From David Noel
Subject Re: PostgreSQL: CPU utilization creeping to 100%
Date
Msg-id CAHAXwYDCpy9WHq0pMrNKKc646Eksq2yhxmjGN20z-p2SuzMFBA@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL: CPU utilization creeping to 100%  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-general
On 4/3/13, Kevin Grittner <kgrittn@ymail.com> wrote:
> David Noel <david.i.noel@gmail.com> wrote:
>> On 4/2/13, Kevin Grittner <kgrittn@ymail.com> wrote:
>>> David Noel <david.i.noel@gmail.com> wrote:
>>>
>>>> 'select * from pg_stat_activity' shows that the queries are not
>>>> waiting, and are in the idle state.
>>>
>>> The process is idle or the process is running the query?  If the
>>> latter, what do you mean when you say "the queries ... are in the
>>> idle state"?
>>
>> select * from pg_stat_activity returns a table containing a column
>> labeled "state". When the postgres process is at 100% utilization and
>> the application has hung, this query returns the value "idle" in that
>> field. When things are running properly, as they are for the moment
>> now, the value is "active".
>
> When a connection shows "idle", the related process should be
> showing zero CPU usage.  Are you seeing something different?  If
> so, is the transaction or query start time changing from one sample
> to the next?

The related process was maxed out at or near 100%. I've scanned
chapter 18.4 of the documentation and along with some suggested values
from a reply earlier have brought things to the point where it *seems*
to be stable. I'm continuing to test though, so if the issue pops up
again I'll check to see whether the query start time is changing or
not.

Thanks for the help,

-David


pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Need advice to avoid ORDER BY
Next
From: David Noel
Date:
Subject: Re: PostgreSQL: CPU utilization creeping to 100%