Re: CPU load high

From: "Patrick" <patrick(at)kickuh(dot)net>
To: "Max Zorloff" <zorloff(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CPU load high
Date: 2007-08-23 07:49:23
Message-ID: 11689.217.149.203.226.1187855363.squirrel@mail.kickuh.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Max,

To find out what is causing the big load you could also try to use 'ATOP'
which can be found at http://www.atcomputing.nl/atop. This tool shows more
(accurate) information than the regular TOP.

There are also some kernel patches available which, when applied to your
kernel, even show more information which might come in handy.

Good Luck,

Patrick Lindeman

> Hello.
>
> I have a web-server with php 5.2 connected to postgres 8.0 backend. Most
> of the queries the users are doing are SELECTs (100-150 in a second for
> 100 concurrent users), with a 5-10 INSERTs/UPDATEs at the same time. There
> is also a demon running in the background doing some work once every
> 100ms. 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.
>
> And the second question is that over time demon and writer processes use
> more and more shared memory - is it normal?
>
> Thanks in advance.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Lindeman 2007-08-23 07:51:19 Re: CPU load high
Previous Message Tom Lane 2007-08-23 06:13:51 Re: "out of memory" error