From: | "Max Zorloff" <zorloff(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: CPU load high |
Date: | 2007-08-23 09:04:31 |
Message-ID: | op.txh8tt05ll0p5y@1-rtt202dnf3uds.mshome.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 23 Aug 2007 08:29:03 +0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Max Zorloff" <zorloff(at)gmail(dot)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?
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2007-08-23 09:16:46 | Re: reporting tools |
Previous Message | Ow Mun Heng | 2007-08-23 08:57:04 | Re: reporting tools |