Re: CPU load high - Mailing list pgsql-general

From Max Zorloff
Subject Re: CPU load high
Date
Msg-id op.txh8tt05ll0p5y@1-rtt202dnf3uds.mshome.net
Whole thread Raw
In response to Re: CPU load high  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CPU load high  (Hannes Dorbath <light@theendofthetunnel.de>)
List pgsql-general
On Thu, 23 Aug 2007 08:29:03 +0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "Max Zorloff" <zorloff@gmail.com> writes:
>> ... The problem is that after the number of concurrent users rises to
>> 100, CPU becomes almost 100% loaded. How do I find out what's hogging
>> the
>> CPU?
>
>> 'top' shows demon using 8% cpu on top, and some amount of postgres
>> processes each using 2% cpu with some apache processes occassionally
>> rising with 2% cpu also. Often the writer process is at the top using
>> 10%
>> cpu.
>
> IOW there's nothing particular hogging the CPU?  Maybe you need more
> hardware than you've got, or maybe you could fix it by trying to
> optimize your most common queries.  It doesn't sound like there'll be
> any quick single-point fix though.

There's no one big process chugging everything yes, but all these 2%
postgres
processes look like they're having their hand in overall cpu consumption.
I looked through every query and they all use indexes and whats more,
return
1-20 rows at most. Yes, I think there won't be any fix, but I wanted to
know,
are there some tools or techinques for finding where the problem lies?

I've looked into query time statistics - they all grow with cpu usage but
it
doesn't really mean anything - cpu usage grows, queries get slower.

When one postgres process waits for lock to release does it use any cpu?
And also, when apache waits for query to finish, does it use cpu?


pgsql-general by date:

Previous
From: Kristo Kaiv
Date:
Subject: table column vs. out param [1:0]
Next
From: Kristo Kaiv
Date:
Subject: Re: table column vs. out param [1:0]